From: Michael Wallner Date: Tue, 9 Apr 2019 06:41:42 +0000 (+0200) Subject: fix normal/verbose/quiet output X-Git-Tag: v4.1.2~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=2419fff2970ab8262ad08ec0fac1867d119fd768;p=pharext%2Fpharext fix normal/verbose/quiet output --- diff --git a/src/pharext/Task/BundleGenerator.php b/src/pharext/Task/BundleGenerator.php index 28af627..5b36fa9 100644 --- a/src/pharext/Task/BundleGenerator.php +++ b/src/pharext/Task/BundleGenerator.php @@ -17,7 +17,7 @@ class BundleGenerator implements Task * @return Generator */ public function run($verbose = false) { - if ($verbose) { + if ($verbose !== false) { printf("Packaging pharext ... \n"); } $rdi = new RecursiveDirectoryIterator(dirname(dirname(__DIR__))); diff --git a/src/pharext/Task/PharCompress.php b/src/pharext/Task/PharCompress.php index 78a9349..1b6571f 100644 --- a/src/pharext/Task/PharCompress.php +++ b/src/pharext/Task/PharCompress.php @@ -55,7 +55,7 @@ class PharCompress implements Task * @return string */ public function run($verbose = false) { - if ($verbose) { + if ($verbose !== false) { printf("Compressing %s ...\n", basename($this->package->getPath())); } /* stop shebang */ diff --git a/src/pharext/Task/PharSign.php b/src/pharext/Task/PharSign.php index 8fa1e46..62ec925 100644 --- a/src/pharext/Task/PharSign.php +++ b/src/pharext/Task/PharSign.php @@ -42,7 +42,7 @@ class PharSign implements Task * @return \pharext\Openssl\PrivateKey */ public function run($verbose = false) { - if ($verbose) { + if ($verbose !== false) { printf("Signing %s ...\n", basename($this->phar->getPath())); } $this->pkey->sign($this->phar); diff --git a/src/pharext/Task/StreamFetch.php b/src/pharext/Task/StreamFetch.php index 029754e..d2a9e82 100644 --- a/src/pharext/Task/StreamFetch.php +++ b/src/pharext/Task/StreamFetch.php @@ -65,7 +65,7 @@ class StreamFetch implements Task } $context = $this->createStreamContext(); - if (!$remote = fopen($this->source, "r", false, $context)) { + if (!$remote = @fopen($this->source, "r", false, $context)) { throw new Exception; }