From: Chad Horohoe Date: Sat, 22 Aug 2009 16:50:03 +0000 (+0000) Subject: Merge r53381 from wmf-deployment. Throw more informational error on creation failure. X-Git-Tag: 1.31.0-rc.0~40123 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=ba7d16a4107f325a44f8eb4bf8ec34154d8df2f7;p=lhc%2Fweb%2Fwiklou.git Merge r53381 from wmf-deployment. Throw more informational error on creation failure. --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 580b510b07..dcf8e8d8ef 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2074,7 +2074,12 @@ function wfMkdirParents( $dir, $mode = null, $caller = null ) { if ( is_null( $mode ) ) $mode = $wgDirectoryMode; - return mkdir( $dir, $mode, true ); // PHP5 <3 + $ok = mkdir( $dir, $mode, true ); // PHP5 <3 + if( !$ok ) { + // PHP doesn't report the path in its warning message, so add our own to aid in diagnosis. + trigger_error( __FUNCTION__ . ": failed to mkdir \"$dir\" mode $mode", E_USER_WARNING ); + } + return $ok; } /**