Permalink
Browse files

Fixes #1111 - Use PHP_BINARY constant when available

  • Loading branch information...
1 parent 0469c41 commit f8a73ae7a55689672e203a10e5764ea03f0a7215 @mrook mrook committed Jul 1, 2014
Showing with 5 additions and 1 deletion.
  1. +5 −1 classes/phing/Phing.php
View
6 classes/phing/Phing.php
@@ -1247,7 +1247,11 @@ private static function setSystemConstants() {
break;
}
- self::setProperty('php.interpreter', getenv('PHP_COMMAND'));
+ if (defined('PHP_BINARY')) {
+ self::setProperty('php.interpreter', PHP_BINARY);
+ } else {
+ self::setProperty('php.interpreter', getenv('PHP_COMMAND'));
+ }
self::setProperty('line.separator', PHP_EOL);
self::setProperty('php.version', PHP_VERSION);
self::setProperty('user.home', getenv('HOME'));

0 comments on commit f8a73ae

Please sign in to comment.