summaryrefslogtreecommitdiffstats
path: root/wp-inst/wp-includes/cache.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-11-21 09:24:59 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-11-21 09:24:59 +0000
commitca9480281cb3cb331788f8475b1e080bff59ec8d (patch)
tree03c3457f2c0be80543aec170ff2781087b532b62 /wp-inst/wp-includes/cache.php
parentefcb857423cc3556d2283152cc1de82f6c56cc74 (diff)
downloadwordpress-mu-ca9480281cb3cb331788f8475b1e080bff59ec8d.tar.gz
wordpress-mu-ca9480281cb3cb331788f8475b1e080bff59ec8d.tar.xz
wordpress-mu-ca9480281cb3cb331788f8475b1e080bff59ec8d.zip
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@442 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-includes/cache.php')
-rw-r--r--wp-inst/wp-includes/cache.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/wp-inst/wp-includes/cache.php b/wp-inst/wp-includes/cache.php
index 34eda42..a24f9f5 100644
--- a/wp-inst/wp-includes/cache.php
+++ b/wp-inst/wp-includes/cache.php
@@ -282,7 +282,9 @@ class WP_Object_Cache {
}
// Acquire a write lock.
- $mutex = fopen($this->cache_dir.$this->flock_filename, 'w');
+ $mutex = @fopen($this->cache_dir.$this->flock_filename, 'w');
+ if ( false == $mutex)
+ return;
flock($mutex, LOCK_EX);
// Loop over dirty objects and save them.
@@ -302,7 +304,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)) {