From 49e97b4c41069d0b0ff332499ae8699527d339bd Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Sat, 14 Mar 2009 02:17:01 +0000 Subject: [PATCH] Check if the path is writable before trying to mkdir(). --- includes/GlobalFunctions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 2605ad002f..35d8f18212 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2008,6 +2008,9 @@ function wfMkdirParents( $dir, $mode = null ) { if ( is_null( $mode ) ) $mode = $wgDirectoryMode; + if ( !is_writable( $dir ) ) { + return false; + } return mkdir( $dir, $mode, true ); // PHP5 <3 } -- 2.20.1