From 9d23eb156f2a8fc17f1ebd0615c357ac05e456e4 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Sun, 20 Jun 2010 15:41:38 +0000 Subject: [PATCH] Skip PHP warnings for mkdir() call. We throw our own and having essentially duplicate warnings is annoying --- includes/GlobalFunctions.php | 4 ++++ 1 file changed, 4 insertions(+) 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 ); -- 2.20.1