From fa46824df1597b9daad7dd438630208ddb3d1639 Mon Sep 17 00:00:00 2001 From: Sergey Tsalkov Date: Fri, 10 Jul 2020 00:00:27 +0000 Subject: [PATCH] get_class_vars() is broken in PHP 7.4 with opcache enabled, so stop using it looks like this fix actually works with PHP 5.2 after all, so not dropping backwards compatibility resolves #64 --- db.class.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/db.class.php b/db.class.php index 6c208bd..90963e1 100644 --- a/db.class.php +++ b/db.class.php @@ -164,11 +164,9 @@ class MeekroDB { // suck in config settings from static class public function sync_config() { - $db_class_vars = get_class_vars('DB'); // the DB::$$var syntax only works in 5.3+ - foreach (DB::$variables_to_sync as $variable) { - if ($this->$variable !== $db_class_vars[$variable]) { - $this->$variable = $db_class_vars[$variable]; + if ($this->$variable !== DB::$$variable) { + $this->$variable = DB::$$variable; } } }