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 {
174
174
175
175
public function equals ($ value ): bool {
176
176
$ available = $ this ->getAvailableValues ();
177
+ if (!isset ($ available [$ this ->value ])) {
178
+ return false ;
179
+ }
177
180
return strcasecmp ($ available [$ this ->value ], $ value ) === 0 ;
178
181
}
179
182
180
183
public function notEquals ($ value ): bool {
184
+ $ available = $ this ->getAvailableValues ();
185
+ if (!isset ($ available [$ this ->value ])) {
186
+ return false ;
187
+ }
181
188
return !$ this ->equals ($ value );
182
189
}
183
190
184
191
public function greaterThan ($ value ): bool {
185
192
$ available = $ this ->getAvailableValues ();
193
+ if (!isset ($ available [$ this ->value ])) {
194
+ return false ;
195
+ }
186
196
return strcasecmp ($ available [$ this ->value ], $ value ) > 0 ;
187
197
}
188
198
189
199
public function lessThan ($ value ): bool {
200
+ $ available = $ this ->getAvailableValues ();
201
+ if (!isset ($ available [$ this ->value ])) {
202
+ return false ;
203
+ }
190
204
return !$ this ->greaterThan ($ value ) && !$ this ->equals ($ value );
191
205
}
192
206
You can’t perform that action at this time.
0 commit comments