Skip to content
Browse files

Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into …

…develop
  • Loading branch information...
2 parents 2a7c354 + 20209d6 commit 635b28d10d6a45fc73ec61efa4c5d88dcfdb1aac @it-can committed Nov 15, 2012
Showing with 11 additions and 1 deletion.
  1. +11 −1 system/database/DB_cache.php
View
12 system/database/DB_cache.php
@@ -95,12 +95,22 @@ public function check_path($path = '')
? rtrim(realpath($path), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR
: rtrim($path, '/').'/';
- if ( ! is_dir($path) OR ! is_really_writable($path))
+ if ( ! is_dir($path))
{
+ log_message('debug', 'DB cache path error: '.$path);
+
// If the path is wrong we'll turn off caching
return $this->db->cache_off();
}
+ if ( ! is_really_writable($path))
+ {
+ log_message('debug', 'DB cache dir not writable: '.$path);
+
+ // If the path is not really writable we'll turn off caching
+ return $this->db->cache_off();
+ }
+
$this->db->cachedir = $path;
return TRUE;
}

0 comments on commit 635b28d

Please sign in to comment.
Something went wrong with that request. Please try again.