From: Chad Horohoe Date: Sun, 20 Jun 2010 15:41:38 +0000 (+0000) Subject: Skip PHP warnings for mkdir() call. We throw our own and having essentially duplicate... X-Git-Tag: 1.31.0-rc.0~36449 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=9d23eb156f2a8fc17f1ebd0615c357ac05e456e4;p=lhc%2Fweb%2Fwiklou.git Skip PHP warnings for mkdir() call. We throw our own and having essentially duplicate warnings is annoying --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index a7d6cc2083..c475a8284a 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2144,7 +2144,11 @@ function wfMkdirParents( $dir, $mode = null, $caller = null ) { if ( is_null( $mode ) ) $mode = $wgDirectoryMode; + // Turn off the normal warning, we're doing our own below + wfSuppressWarnings(); $ok = mkdir( $dir, $mode, true ); // PHP5 <3 + wfRestoreWarnings(); + 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 );