From: Brion Vibber Date: Sat, 19 Jul 2008 07:29:43 +0000 (+0000) Subject: Cleanup for r37830 & earlier ($wgDirectoryMode default to wfMkdirParents()): X-Git-Tag: 1.31.0-rc.0~46449 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=b006e958520927f98121a186ff90c2d54821f7bf;p=lhc%2Fweb%2Fwiklou.git Cleanup for r37830 & earlier ($wgDirectoryMode default to wfMkdirParents()): Just check is_null() here. is_int() isn't necessarily safe, as numbers frequently get passed around in what are really strings. :) --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 86bbdc6ae3..488e94edf3 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -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; }