Skip to content

Commit

Permalink
Merge pull request #4354 from bakin1999/bug/php-warning-null-haystack
Browse files Browse the repository at this point in the history
Fix Pro Search 8.1 Warnings
  • Loading branch information
matthewjohns0n committed Jun 11, 2024
2 parents 5b3a75b + 1eb7c88 commit b973445
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function pro_strpos_all($haystack, $needle)
{
$all = array();

if (preg_match_all('#' . preg_quote($needle, '#') . '#', $haystack, $matches)) {
if ($haystack != null && preg_match_all('#' . preg_quote($needle, '#') . '#', $haystack, $matches)) {
$total = count($matches[0]);
$offset = 0;

Expand Down

0 comments on commit b973445

Please sign in to comment.