File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -129,11 +129,12 @@ final static public function get($value)
129
129
130
130
// find the real value
131
131
$ constants = self ::detectConstants ($ class );
132
- $ name = array_search ($ value , $ constants , true );
132
+ $ name = array_search ($ value , $ constants , true ); // use strict, see next lines
133
133
if ($ name === false ) {
134
- // enumeration values have to be unique by their string representation
135
- // because array_search search in strict more or in non-strict mode we
136
- // have to search for a value of the same string out self.
134
+ // Bnumeration values have to be unique by their string representation.
135
+ // Because array_search searches in strict mode or in non-strict mode only
136
+ // we have to search for a value of the same string our self.
137
+ // (see issue #26)
137
138
$ valueStr = (string ) $ value ;
138
139
$ found = false ;
139
140
foreach ($ constants as $ name => $ constValue ) {
You can’t perform that action at this time.
0 commit comments