From 6d3bb76302dd7bff59ef1d9c2f9aafaad026a5a7 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Fri, 21 Mar 2008 23:22:18 +0000 Subject: [PATCH] - Fix stub/hashbang generation --- ext/phar/phar/pharcommand.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/phar/phar/pharcommand.inc b/ext/phar/phar/pharcommand.inc index 1b6f26895a..f3426423c9 100755 --- a/ext/phar/phar/pharcommand.inc +++ b/ext/phar/phar/pharcommand.inc @@ -411,6 +411,8 @@ class PharCommand extends CLICommand if (substr($hashbang, -1) != "\n") { $hashbang .= "\n"; } + } else { + $hashbang = ""; } if (isset($loader)) { @@ -427,9 +429,9 @@ class PharCommand extends CLICommand $s .= '?>'; $s .= $c; - $phar->setStub($hasbang . $s); + $phar->setStub($hashbang . $s); } else { - $phar->setStub($hasbang . $c); + $phar->setStub($hashbang . $c); } return new SplFileInfo($stub); } -- 2.50.1