mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX: Don’t use SplFixedArray in PHP 7.
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.
This commit is contained in:
parent
454646c4df
commit
f224849cc6
@ -704,8 +704,8 @@ class Config_LRU {
|
|||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
Deprecation::notice('4.0', 'Please use Config_MemCache instead', Deprecation::SCOPE_CLASS);
|
Deprecation::notice('4.0', 'Please use Config_MemCache instead', Deprecation::SCOPE_CLASS);
|
||||||
if (version_compare(PHP_VERSION, '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
|
// SplFixedArray causes seg faults before PHP 5.3.7, and also in 7.0.0-RC1
|
||||||
$this->cache = array();
|
$this->cache = array();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user