From d5cb7e4952b33da42579b40158970ff06b86bd71 Mon Sep 17 00:00:00 2001 From: brettp Date: Wed, 29 Jul 2009 13:19:43 +0000 Subject: Fixes #1151: Added is_dir() check before attempting to create cache directory. git-svn-id: https://code.elgg.org/elgg/trunk@3415 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/cache.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engine/lib/cache.php') diff --git a/engine/lib/cache.php b/engine/lib/cache.php index 70a8d49f2..703f61bd2 100644 --- a/engine/lib/cache.php +++ b/engine/lib/cache.php @@ -313,7 +313,8 @@ // Create full path $path = $this->get_variable("cache_path") . $matrix; - mkdir($path, 0700, true); + if (!is_dir($path)) + mkdir($path, 0700, true); // if (!mkdir($path, 0700, true)) throw new IOException("Could not make $path"); @@ -437,4 +438,4 @@ } } -?> \ No newline at end of file +?> -- cgit v1.2.3