diff --git a/Zend/tests/bug55509.phpt b/Zend/tests/bug55509.phpt index 1ae5b04f8a0..b45150a4979 100644 --- a/Zend/tests/bug55509.phpt +++ b/Zend/tests/bug55509.phpt @@ -49,8 +49,11 @@ elseif (PHP_OS == 'FreeBSD') { die('skip Not enough memory.'); } } elseif (PHP_OS == "WINNT") { - $s = trim(shell_exec("wmic OS get FreeVirtualMemory /Value 2>nul")); - $freeMemory = explode('=', $s)[1]*1; + $s = shell_exec("wmic OS get FreeVirtualMemory /Value 2>nul"); + if (!$s) { + die('skip wmic not available'); + } + $freeMemory = explode('=', trim($s))[1]*1; if ($freeMemory < 2.1*1024*1024) { die('skip Not enough memory.'); diff --git a/ext/standard/tests/general_functions/proc_nice_basic-win.phpt b/ext/standard/tests/general_functions/proc_nice_basic-win.phpt index 20e8454f8b5..0aee620c89b 100644 --- a/ext/standard/tests/general_functions/proc_nice_basic-win.phpt +++ b/ext/standard/tests/general_functions/proc_nice_basic-win.phpt @@ -11,6 +11,10 @@ if (!defined('PHP_WINDOWS_VERSION_MAJOR')) { if (getenv('SKIP_SLOW_TESTS')) { die('skip: Slow test'); } + +if (!shell_exec("where wmic 2>nul")) { + die('skip wmic not available'); +} ?> --FILE--