Cleanup for r37830 & earlier ($wgDirectoryMode default to wfMkdirParents()):
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 19 Jul 2008 07:29:43 +0000 (07:29 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 19 Jul 2008 07:29:43 +0000 (07:29 +0000)
Just check is_null() here. is_int() isn't necessarily safe, as numbers frequently get passed around in what are really strings. :)

includes/GlobalFunctions.php

index 86bbdc6..488e94e 100644 (file)
@@ -1781,7 +1781,7 @@ function wfMkdirParents( $fullDir, $mode = null ) {
        if( file_exists( $fullDir ) )
                return true;
        // If not defined or isn't an int, set to default
-       if ( !$mode || !is_int($mode) ) {
+       if ( is_null( $mode ) ) {
                $mode = $wgDirectoryMode;
        }