Suppress fopen warnings and check return.
git-svn-id: https://develop.svn.wordpress.org/trunk@3170 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d9d9fedb7a
commit
f086287b81
|
@ -302,7 +302,9 @@ class WP_Object_Cache {
|
|||
|
||||
$temp_file = tempnam($group_dir, 'tmp');
|
||||
$serial = CACHE_SERIAL_HEADER.serialize($this->cache[$group][$id]).CACHE_SERIAL_FOOTER;
|
||||
$fd = fopen($temp_file, 'w');
|
||||
$fd = @fopen($temp_file, 'w');
|
||||
if ( false === $fd )
|
||||
continue;
|
||||
fputs($fd, $serial);
|
||||
fclose($fd);
|
||||
if (!@ rename($temp_file, $cache_file)) {
|
||||
|
|
Loading…
Reference in New Issue