1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

Fix #4405: PHP 8 compatibility: redirection::checkMembersOnly()

To accommodate the change in behavior of strpos()

Fixes: https://github.com/e107inc/e107/issues/4405
This commit is contained in:
Nick Liu 2021-06-27 18:02:39 +02:00
parent 3430342d0d
commit a9c2ae3823
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637

View File

@ -280,7 +280,7 @@ class redirection
foreach (e107::getPref('membersonly_exceptions') as $val) foreach (e107::getPref('membersonly_exceptions') as $val)
{ {
$srch = trim($val); $srch = trim($val);
if(strpos(e_SELF, $srch) !== false) if(!empty($srch) && strpos(e_SELF, $srch) !== false)
{ {
return; return;
} }