Skip to content

Commit

Permalink
Merge pull request #25 from boenrobot/phartemplate
Browse files Browse the repository at this point in the history
Added a "//" in front of the replacement holder in phartemplate.php
  • Loading branch information
saltybeagle committed Jul 30, 2014
2 parents 2b165b9 + 03e02ce commit 21c43b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion data/phartemplate.php
@@ -1,7 +1,7 @@
<?php
if (!class_exists('Phar')) {
if (!class_exists('PHP_Archive')) {
@PHPARCHIVE@
//@PHPARCHIVE@
}
if (!in_array('phar', stream_get_wrappers(), true)) {
stream_wrapper_register('phar', 'PHP_Archive');
Expand Down
6 changes: 3 additions & 3 deletions src/Pyrus/Developer/Creator/Phar/PHPArchive.php
Expand Up @@ -50,15 +50,15 @@ public function __construct(
}
$phparchive = '?>' . $phparchive . '<?php';
$template = @file_get_contents(
dirname(__FILE__) .
'/../../../../../data/pear2.php.net/PEAR2_Pyrus_Developer/phartemplate.php'
__DIR__ .
'/../../../../data/pear2.php.net/PEAR2_Pyrus_Developer/phartemplate.php'
);
if (!$template) {
$template = file_get_contents(
__DIR__ . '/../../../../data/phartemplate.php'
);
}
$this->stub = str_replace('@PHPARCHIVE@', $phparchive, $template);
$this->stub = str_replace('//@PHPARCHIVE@', $phparchive, $template);
if ($startupfile === false) {
$startupfile = '<?php
$extract = getcwd();
Expand Down

0 comments on commit 21c43b8

Please sign in to comment.