From eb7c5634069dae248c2f6c13597803f328e110a0 Mon Sep 17 00:00:00 2001 From: ryan Date: Sat, 19 Nov 2005 22:52:57 +0000 Subject: [PATCH] Silence fopen warnings and check return. git-svn-id: http://svn.automattic.com/wordpress/trunk@3171 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/cache.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/cache.php b/wp-includes/cache.php index aacf3016e9..b113cc4723 100644 --- a/wp-includes/cache.php +++ b/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.