Skip to content

Commit

Permalink
Don't set consumed to false when there is no next character. Check fo…
Browse files Browse the repository at this point in the history
…r consuming returning false. Fixes simplepie#22.
  • Loading branch information
gsnedders committed Jun 26, 2009
1 parent af2e789 commit bea53a8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions simplepie.inc
Expand Up @@ -11438,7 +11438,6 @@ class SimplePie_Decode_HTML_Entities
}
else
{
$this->consumed = false;
return false;
}
}
Expand All @@ -11461,7 +11460,6 @@ class SimplePie_Decode_HTML_Entities
}
else
{
$this->consumed = false;
return false;
}
}
Expand Down Expand Up @@ -11535,7 +11533,7 @@ class SimplePie_Decode_HTML_Entities
$replacement = SimplePie_Misc::codepoint_to_utf8($codepoint);
}

if ($this->consume() !== ';')
if (!in_array($this->consume(), array(';', false), true))
{
$this->unconsume();
}
Expand Down

0 comments on commit bea53a8

Please sign in to comment.