mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Making apc feature test rely on apc_dec.
ZCS comes with a busted apc, and we need apc_dec to properly use the ApcEngine anyways. Fixes #2105
This commit is contained in:
parent
beac58188c
commit
d7155d374b
3 changed files with 3 additions and 3 deletions
|
@ -297,7 +297,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
$engine = 'File';
|
$engine = 'File';
|
||||||
if (extension_loaded('apc') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) {
|
if (extension_loaded('apc') && function_exists('apc_dec') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) {
|
||||||
$engine = 'Apc';
|
$engine = 'Apc';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ class ApcEngine extends CacheEngine {
|
||||||
*/
|
*/
|
||||||
public function init($settings = array()) {
|
public function init($settings = array()) {
|
||||||
parent::init(array_merge(array('engine' => 'Apc', 'prefix' => Inflector::slug(APP_DIR) . '_'), $settings));
|
parent::init(array_merge(array('engine' => 'Apc', 'prefix' => Inflector::slug(APP_DIR) . '_'), $settings));
|
||||||
return function_exists('apc_cache_info');
|
return function_exists('apc_dec');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -297,7 +297,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
$engine = 'File';
|
$engine = 'File';
|
||||||
if (extension_loaded('apc') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) {
|
if (extension_loaded('apc') && function_exists('apc_dec') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) {
|
||||||
$engine = 'Apc';
|
$engine = 'Apc';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue