r68322 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68321‎ | r68322 | r68323 >
Date:15:41, 20 June 2010
Author:demon
Status:ok
Tags:
Comment:
Skip PHP warnings for mkdir() call. We throw our own and having essentially duplicate warnings is annoying
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -2144,7 +2144,11 @@
21452145 if ( is_null( $mode ) )
21462146 $mode = $wgDirectoryMode;
21472147
 2148+ // Turn off the normal warning, we're doing our own below
 2149+ wfSuppressWarnings();
21482150 $ok = mkdir( $dir, $mode, true ); // PHP5 <3
 2151+ wfRestoreWarnings();
 2152+
21492153 if( !$ok ) {
21502154 // PHP doesn't report the path in its warning message, so add our own to aid in diagnosis.
21512155 trigger_error( __FUNCTION__ . ": failed to mkdir \"$dir\" mode $mode", E_USER_WARNING );

Status & tagging log