r53381 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53380‎ | r53381 | r53382 >
Date:21:00, 16 July 2009
Author:brion
Status:ok
Tags:
Comment:
hack in a more detailed warning when wfMkdirParents() fails, to work around PHP's warning in the error log not including the actual path.
Modified paths:
  • /branches/wmf-deployment/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/includes/GlobalFunctions.php
@@ -2069,7 +2069,12 @@
20702070 if ( is_null( $mode ) )
20712071 $mode = $wgDirectoryMode;
20722072
2073 - return mkdir( $dir, $mode, true ); // PHP5 <3
 2073+ $ok = mkdir( $dir, $mode, true ); // PHP5 <3
 2074+ if( !$ok ) {
 2075+ // PHP doesn't report the path in its warning message, so add our own to aid in diagnosis.
 2076+ trigger_error( __FUNCTION__ . ": failed to mkdir \"$dir\" mode $mode", E_USER_WARNING );
 2077+ }
 2078+ return $ok;
20742079 }
20752080
20762081 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r55480Merge r53381 from wmf-deployment. Throw more informational error on creation ...demon16:50, 22 August 2009
r58663Update GlobalUsage to trunk state, merge related r53381werdna16:45, 6 November 2009

Status & tagging log