From 7e48c4989e38a8de3fb1af19e62d54680092fa55 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 13 Dec 2018 18:59:18 +0900 Subject: [PATCH] Revert "Fix var_export() not working for ArrayObject class" This reverts commit e527269633aa5d0fb9a359843ed6add00701c2cb. --- common/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/functions.php b/common/functions.php index 4c844d9af..7e6da87a6 100644 --- a/common/functions.php +++ b/common/functions.php @@ -418,7 +418,10 @@ function url2path($url) function var_export_clean($var) { $result = var_export($var, true); - $result = preg_replace('/(?:ArrayObject|stdClass)::__set_state\((?=array\(\n)/', '(object)(', $result); + if (version_compare(PHP_VERSION, '7.3', '<')) + { + $result = preg_replace('/stdClass::__set_state\((?=array\(\n)/', '(object)(', $result); + } return $result; }