Skip to content

Commit 70fb1b9

Browse files
authored
Merge pull request #226 from mlocati/ignore-php-warnings-inspecting-php
Ignore PHP warnings inspecting a PHP version
2 parents cfa4ee8 + 340a290 commit 70fb1b9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Engine/PHP.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,11 @@ private function getFromConstants()
269269
. 'echo PHP_DEBUG . \"\n\"; ';
270270

271271
$cmd = $this->phpCliEscaped . ' -n -r ' . '"' . str_replace("\n", '', $script) . '"';
272+
if (DIRECTORY_SEPARATOR === '\\') {
273+
$cmd .= ' 2>NUL';
274+
} else {
275+
$cmd .= ' 2>/dev/null';
276+
}
272277

273278
$info = null;
274279
exec($cmd, $info);

0 commit comments

Comments
 (0)