Permalink
Browse files

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
  • Loading branch information...
1 parent beac581 commit d7155d374b9a10af08ec93955d03aa664093026a @markstory markstory committed Oct 19, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 app/Config/core.php
  2. +1 −1 lib/Cake/Cache/Engine/ApcEngine.php
  3. +1 −1 lib/Cake/Console/Templates/skel/Config/core.php
View
@@ -297,7 +297,7 @@
*
*/
$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';
}
@@ -37,7 +37,7 @@ class ApcEngine extends CacheEngine {
*/
public function init($settings = array()) {
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';
-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';
}

0 comments on commit d7155d3

Please sign in to comment.