Browse files

do not show exception when apc_enabled parameter is false

  • Loading branch information...
1 parent 93cb52a commit 52550c42093da15c5e43e214cb94e9ca1857684a @kelu95 committed Jun 16, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 Controller/Cache.php
View
8 Controller/Cache.php
@@ -127,9 +127,15 @@ public function showInfos($cache_type='user')
*/
private function isApcEnabled()
{
- if(function_exists('apc_add') && $this->apc_enabled==1){
+ if($this->apc_enabled!=1){
+ //don't show execption in that case
+ return false;
+ }
+
+ if(function_exists('apc_add')){
return true;
}
+
throw new \Exception("The APC Extension is not enabled.\nPlease, check your server configuration.\nThe parameter \"apc_enabled\" must set to true\nThe parameter \"apc_ttl\" must be int val");
return false;
}

0 comments on commit 52550c4

Please sign in to comment.