Skip to content

Commit

Permalink
Merge pull request #388 from JohnVillalovos/jlvillal/stripos
Browse files Browse the repository at this point in the history
fix: error about null value to `stripos()`
  • Loading branch information
effgarces authored Jul 10, 2024
2 parents 8b54261 + d7d449d commit 529c195
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Application/Schedule/ScheduleResourceFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private function AttributeValueMatches($attribute, $value)
}

if ($value->Type() == CustomAttributeTypes::SINGLE_LINE_TEXTBOX || $value->Type() == CustomAttributeTypes::MULTI_LINE_TEXTBOX) {
return strripos($value->Value(), $attribute->Value) !== false;
return strripos($value->Value() ?? "", $attribute->Value) !== false;
} elseif (is_numeric($value->Value())) {
return floatval($value->Value()) == $attribute->Value;
} else {
Expand Down

0 comments on commit 529c195

Please sign in to comment.