wfMkdirParents() should display mode in octal.
authorPlatonides <platonides@gmail.com>
Tue, 17 Apr 2012 20:57:06 +0000 (22:57 +0200)
committersaper <saper@saper.info>
Thu, 19 Apr 2012 09:04:11 +0000 (11:04 +0200)
Patchset 2: Address issue pointed out by CR

Change-Id: Ia156903131612f3faa93a7010de2e034d528ec7d

includes/GlobalFunctions.php

index 8764783..0eb8dc1 100644 (file)
@@ -2657,7 +2657,8 @@ function wfMkdirParents( $dir, $mode = null, $caller = null ) {
 
        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 );
+               trigger_error( sprintf( "%s: failed to mkdir \"%s\" mode 0%o", __FUNCTION__, $dir, $mode ),
+                       E_USER_WARNING );
        }
        return $ok;
 }