Permalink
Browse files

Use substr() instead of str_replace()

  • Loading branch information...
1 parent c139579 commit 559fa6ec92a89192efeea19febc02de7ea50f285 @rmccue rmccue committed Jan 26, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 SimplePie/HTTP/Parser.php
@@ -511,7 +511,7 @@ protected function chunked() {
$length = hexdec($matches[1]);
$chunk_length = strlen($matches[0]);
$decoded .= $part = substr($encoded, $chunk_length, $length);
- $encoded = ltrim(str_replace(array($matches[0], $part), '', $encoded), "\r\n");
+ $encoded = ltrim(substr($encoded, $chunk_length + $length), "\r\n");
if (trim($encoded) === '0') {
$this->state = 'emit';

0 comments on commit 559fa6e

Please sign in to comment.