From f5af0c85bade63174d282162a6c99fb37461b433 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Fri, 28 Aug 2015 16:42:43 +1200 Subject: [PATCH] =?UTF-8?q?FIX:=20Don=E2=80=99t=20use=20SplFixedArray=20in?= =?UTF-8?q?=20PHP=207.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PHP 7 seems to suffer a segfault when using SplFixedArray. Since LRU is deprecated anyway, I’m not too fussed about getting to the bottom of this issue, however, if it turns out that SplFixedArray is corrected in PHP 7.0.0 stable or a future patch release, we could update this check. --- core/Config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/Config.php b/core/Config.php index 86fc577ae..e2e8fabbc 100644 --- a/core/Config.php +++ b/core/Config.php @@ -703,8 +703,8 @@ class Config_LRU { public function __construct() { Deprecation::notice('4.0', 'Please use Config_MemCache instead', Deprecation::SCOPE_CLASS); - if (version_compare(PHP_VERSION, '5.3.7', '<')) { - // SplFixedArray causes seg faults before PHP 5.3.7 + if (version_compare(PHP_VERSION, '5.3.7', '<') || version_compare(PHP_VERSION, '6.99.99', '>')) { + // SplFixedArray causes seg faults before PHP 5.3.7, and also in 7.0.0-RC1 $this->cache = array(); } else {