Use PHP_OS rather than php_uname, which may be disabled
authorOri Livneh <ori@wikimedia.org>
Wed, 28 Jan 2015 04:38:57 +0000 (20:38 -0800)
committerKrinkle <krinklemail@gmail.com>
Thu, 9 Apr 2015 12:16:17 +0000 (12:16 +0000)
commite0e6c9c74684d5e63fe172d15c8f79ca9cca998e
tree264ba7819d5979eb9f99bc5845f6850218e207b8
parent85acf8afba3df02f1a740f249db88ad9c5ffc178
Use PHP_OS rather than php_uname, which may be disabled

A user just logged on to the #mediawiki channel to ask for help because his
webhost disallowed php_uname(), causing wfIsWindows() to crash. Google
autocompletes 'php_uname()' to 'php_uname() has been disabled for security
reasons', so it is probably not uncommon. Consulting the PHP_OS constant
instead side-steps the problem nicely.

Change-Id: I8d63826db4fc5d142eac53717d4f9fbbf9928de9
includes/GlobalFunctions.php