Skip to content

Commit

Permalink
Adding a check for '' and failure. When trying to Cache '', FileEngin…
Browse files Browse the repository at this point in the history
…e will return false. This shouldn't trigger an error inside Cache.
  • Loading branch information
markstory committed Jul 28, 2010
1 parent 339fa29 commit a8b05c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cake/libs/cache.php
Expand Up @@ -270,7 +270,7 @@ public static function write($key, $value, $config = null) {

$success = self::$_engines[$config]->write($settings['prefix'] . $key, $value, $settings['duration']);
self::set();
if ($success === false) {
if ($success === false && $value !== '') {
trigger_error(
sprintf(__("%s cache was unable to write '%s' to cache", true), $config, $key),
E_USER_WARNING
Expand Down

0 comments on commit a8b05c2

Please sign in to comment.