Only need one check for is_dir
authorElliott Eggleston <ejegg@ejegg.com>
Mon, 2 Mar 2015 18:25:25 +0000 (10:25 -0800)
committerEjegg <eeggleston@wikimedia.org>
Mon, 2 Mar 2015 18:38:16 +0000 (18:38 +0000)
It implicitly includes file_exists test.

Change-Id: I25a6e609801455f2102d14035900248192e49f39

includes/GlobalFunctions.php

index 5232413..7377433 100644 (file)
@@ -2558,7 +2558,7 @@ function wfMkdirParents( $dir, $mode = null, $caller = null ) {
                wfDebug( "$caller: called wfMkdirParents($dir)\n" );
        }
 
-       if ( strval( $dir ) === '' || ( file_exists( $dir ) && is_dir( $dir ) ) ) {
+       if ( strval( $dir ) === '' || is_dir( $dir ) ) {
                return true;
        }