Skip to content

Commit

Permalink
Remove bug in autorun management in PHAR.
Browse files Browse the repository at this point in the history
  • Loading branch information
mageekguy committed Oct 8, 2012
1 parent bb42327 commit 9694f61
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions classes/scripts/runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ public function testMethod($class, $method)
return $this;
}

public static function autorunIsEnabled()
public static function autorunMustBeEnabled()
{
return (static::$autorunner !== false);
return (static::$autorunner !== false && static::$autorunner === true);
}

public static function enableAutorun($name)
Expand Down
2 changes: 1 addition & 1 deletion scripts/phar/resources/stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
define(__NAMESPACE__ . '\scripts\runner', __FILE__);
}

if (phar\stub::autorunIsEnabled() === true)
if (phar\stub::autorunMustBeEnabled() === true)
{
phar\stub::enableAutorun(constant(__NAMESPACE__ . '\scripts\runner'));
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
define(__NAMESPACE__ . '\scripts\runner', __FILE__);
}

if (scripts\runner::autorunIsEnabled() === true)
if (scripts\runner::autorunMustBeEnabled() === true)
{
scripts\runner::enableAutorun(constant(__NAMESPACE__ . '\scripts\runner'));
}

0 comments on commit 9694f61

Please sign in to comment.