Skip to content

Commit

Permalink
QA: Fixed bugs #12730: Now the generated __destruct not fall in a inf…
Browse files Browse the repository at this point in the history
…inite loop (second fix of the bug, this time with a more efficient solution).

git-svn-id: http://svn.php.net/repository/pear/packages/PHP_ParserGenerator/trunk@302206 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
Jesús Espino García committed Aug 14, 2010
1 parent 11b454e commit c263cb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lempar.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static function PrintTrace()
/**
* @var int
*/
public $yyidx; /* Index of top element in stack */
public $yyidx = -1; /* Index of top element in stack */
/**
* @var int
*/
Expand Down Expand Up @@ -347,7 +347,7 @@ function yy_pop_parser_stack()
*/
function __destruct()
{
while ($this->yystack !== Array()) {
while ($this->yyidx >= 0) {
$this->yy_pop_parser_stack();
}
if (is_resource(self::$yyTraceFILE)) {
Expand Down

0 comments on commit c263cb4

Please sign in to comment.