fix installer tempdir usage
authorMichael Wallner <mike@php.net>
Sun, 22 Mar 2015 08:13:42 +0000 (09:13 +0100)
committerMichael Wallner <mike@php.net>
Sun, 22 Mar 2015 08:13:42 +0000 (09:13 +0100)
bin/pharext
src/pharext/Installer.php

index cd8fe7c6d5c09b5260e70523259b3396f3abf322..8b7f25ef84da50a40efb37d8267107adde49a44c 100755 (executable)
Binary files a/bin/pharext and b/bin/pharext differ
index 94f814950178a8a978a0084cef85dd3fa45ecf90..7866b65a160711009ee1e6ee32ae91bdebdc7c46 100644 (file)
@@ -64,17 +64,17 @@ class Installer implements Command
         */
        public function run($argc, array $argv) {
                $this->cwd = getcwd();
-               $this->tmp = $this->tempname(basename(Phar::running(false)));
+               $this->tmp = new Tempdir(basename(Phar::running(false)));
 
                $phar = new Phar(Phar::running(false));
                foreach ($phar as $entry) {
                        if (fnmatch("*.ext.phar*", $entry->getBaseName())) {
                                $temp = new Tempdir($entry->getBaseName());
                                $phar->extractTo($temp, $entry->getFilename(), true);
-                               $phars[$temp] = new Phar($temp."/".$entry->getFilename());
+                               $phars[(string) $temp] = new Phar($temp."/".$entry->getFilename());
                        }
                }
-               $phars[$this->tmp] = $phar;
+               $phars[(string) $this->tmp] = $phar;
 
                foreach ($phars as $phar) {
                        if (isset($phar["pharext_install.php"])) {