PHP 8.1 compatibility

This commit is contained in:
slawkens
2023-02-02 16:16:06 +01:00
parent d691148c84
commit 0a3a079b86
15 changed files with 159 additions and 152 deletions

View File

@@ -11,7 +11,7 @@
defined('MYAAC') or die('Direct access not allowed!');
$configForumTablePrefix = config('forum_table_prefix');
if(!empty(trim($configForumTablePrefix))) {
if(null !== $configForumTablePrefix && !empty(trim($configForumTablePrefix))) {
if(!in_array($configForumTablePrefix, array('myaac_', 'z_'))) {
throw new RuntimeException('Invalid value for forum_table_prefix in config.php. Can be only: "myaac_" or "z_".');
}
@@ -322,4 +322,4 @@ class Forum
return $hasAccess;
}
}
?>
?>