r55480 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55479‎ | r55480 | r55481 >
Date:16:50, 22 August 2009
Author:demon
Status:ok
Tags:
Comment:
Merge r53381 from wmf-deployment. Throw more informational error on creation failure.
Modified paths:
  • /trunk/phase3/includes (modified) (history)
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -2074,7 +2074,12 @@
20752075 if ( is_null( $mode ) )
20762076 $mode = $wgDirectoryMode;
20772077
2078 - return mkdir( $dir, $mode, true ); // PHP5 <3
 2078+ $ok = mkdir( $dir, $mode, true ); // PHP5 <3
 2079+ if( !$ok ) {
 2080+ // PHP doesn't report the path in its warning message, so add our own to aid in diagnosis.
 2081+ trigger_error( __FUNCTION__ . ": failed to mkdir \"$dir\" mode $mode", E_USER_WARNING );
 2082+ }
 2083+ return $ok;
20792084 }
20802085
20812086 /**
Property changes on: trunk/phase3/includes
___________________________________________________________________
Name: svn:mergeinfo
20822087 + /branches/REL1_15/phase3/includes:51646
/branches/wmf-deployment/includes:53381

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r53381hack in a more detailed warning when wfMkdirParents() fails, to work around P...brion21:00, 16 July 2009

Status & tagging log