Skip to content

Commit

Permalink
Fix Deprecated: strpos(): Passing null to parameter in PHP 8.1 fixes d…
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaboesch committed Feb 8, 2023
1 parent e00c80b commit 834939b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ protected function is_ws_access() {
}

// Check rare cases, like webservice/pluginfile.php.
if (strpos($ME, 'webservice/') !== false) {
if (!is_null($ME) && strpos($ME, 'webservice/') !== false) {
$token = optional_param('token', '', PARAM_ALPHANUM);
if ($token) {
return true;
Expand Down

0 comments on commit 834939b

Please sign in to comment.