Skip to content

Commit

Permalink
Fixed autoloader loading from phar.
Browse files Browse the repository at this point in the history
  • Loading branch information
boenrobot committed Aug 3, 2012
1 parent 2c4fe98 commit 3b6ea2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This package abstracts this away, so that when you want to get exactly N amount
<active>yes</active>
</lead>
<date>2012-08-03</date>
<time>02:47:16</time>
<time>04:21:01</time>
<version>
<release>1.0.0a3</release>
<api>1.0.0</api>
Expand Down
6 changes: 2 additions & 4 deletions stub.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?php
if (count(get_included_files()) > 1) {
Phar::mapPhar();
$autoloder = 'phar://' . __FILE__ . DIRECTORY_SEPARATOR . 'src'
require_once 'phar://' . __FILE__ . DIRECTORY_SEPARATOR .
'@PACKAGE_NAME@-@PACKAGE_VERSION@' . DIRECTORY_SEPARATOR . 'src'
. DIRECTORY_SEPARATOR . 'PEAR2' . DIRECTORY_SEPARATOR . 'Autoload.php';
if (is_file($autoloder)) {
include_once $autoloder;
}
} else {
$isNotCli = PHP_SAPI !== 'cli';
if ($isNotCli) {
Expand Down

0 comments on commit 3b6ea2f

Please sign in to comment.