From ffbf67b2a9db2c2e2744f47f98b7b7458bebb520 Mon Sep 17 00:00:00 2001 From: futureFry Date: Wed, 28 Feb 2018 19:45:50 -0800 Subject: [PATCH] Update switch.php at Line 1282 detecting windows (#3007) if (stristr(PHP_OS, 'WIN')) isn't specific enough, it will be true for Darwin or Windows. --- resources/switch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/switch.php b/resources/switch.php index 28b47ffb2f..4fd332b9f2 100644 --- a/resources/switch.php +++ b/resources/switch.php @@ -1279,7 +1279,7 @@ if (!function_exists('switch_conf_xml')) { $file_contents = file_get_contents($path."/autoload_configs/switch.conf.xml"); //prepare the php variables - if (stristr(PHP_OS, 'WIN')) { + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $php_bin = win_find_php('php.exe'); if(!$php_bin){ // relay on system path $php_bin = 'php.exe';