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:
Ryan Boren 2005-11-19 20:12:26 +00:00
parent d9d9fedb7a
commit f086287b81
1 changed files with 3 additions and 1 deletions

View File

@ -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)) {