Merge "Use PHP_OS rather than php_uname, which may be disabled"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 22 Apr 2015 20:19:52 +0000 (20:19 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 22 Apr 2015 20:19:52 +0000 (20:19 +0000)
includes/GlobalFunctions.php

index 90460fd..0287798 100644 (file)
@@ -2459,7 +2459,7 @@ function wfTimestampNow() {
 function wfIsWindows() {
        static $isWindows = null;
        if ( $isWindows === null ) {
-               $isWindows = substr( php_uname(), 0, 7 ) == 'Windows';
+               $isWindows = strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN';
        }
        return $isWindows;
 }