Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions framework/caching/FileCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,14 @@
return @touch($cacheFile, $duration + time());
}

$error = error_get_last();
Yii::warning("Unable to write cache file '{$cacheFile}': {$error['message']}", __METHOD__);
$message = "Unable to write cache file '{$cacheFile}'";

Check warning on line 161 in framework/caching/FileCache.php

View check run for this annotation

Codecov / codecov/patch

framework/caching/FileCache.php#L161

Added line #L161 was not covered by tests

if ($error = error_get_last()) {
$message .= ": {$error['message']}";

Check warning on line 164 in framework/caching/FileCache.php

View check run for this annotation

Codecov / codecov/patch

framework/caching/FileCache.php#L163-L164

Added lines #L163 - L164 were not covered by tests
}

Yii::warning($message, __METHOD__);

Check warning on line 167 in framework/caching/FileCache.php

View check run for this annotation

Codecov / codecov/patch

framework/caching/FileCache.php#L167

Added line #L167 was not covered by tests

return false;
}

Expand Down
Loading