File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -174,19 +174,33 @@ public function isValidValue($value): bool {
174174
175175 public function equals ($ value ): bool {
176176 $ available = $ this ->getAvailableValues ();
177+ if (!isset ($ available [$ this ->value ])) {
178+ return false ;
179+ }
177180 return strcasecmp ($ available [$ this ->value ], $ value ) === 0 ;
178181 }
179182
180183 public function notEquals ($ value ): bool {
184+ $ available = $ this ->getAvailableValues ();
185+ if (!isset ($ available [$ this ->value ])) {
186+ return false ;
187+ }
181188 return !$ this ->equals ($ value );
182189 }
183190
184191 public function greaterThan ($ value ): bool {
185192 $ available = $ this ->getAvailableValues ();
193+ if (!isset ($ available [$ this ->value ])) {
194+ return false ;
195+ }
186196 return strcasecmp ($ available [$ this ->value ], $ value ) > 0 ;
187197 }
188198
189199 public function lessThan ($ value ): bool {
200+ $ available = $ this ->getAvailableValues ();
201+ if (!isset ($ available [$ this ->value ])) {
202+ return false ;
203+ }
190204 return !$ this ->greaterThan ($ value ) && !$ this ->equals ($ value );
191205 }
192206
You can’t perform that action at this time.
0 commit comments