Permalink
Browse files

Bug #18981 ->setData('') results in an infinite loop

  • Loading branch information...
1 parent 8ea6267 commit 3e198f88c1164c34be560da679cc9bac4dbae10c @CloCkWeRX CloCkWeRX committed Jan 14, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 HTTP/Download2.php
View
@@ -784,7 +784,7 @@ function sendArchive( $name,
function generateETag()
{
if (!$this->etag) {
- if ($this->data) {
+ if (isset($this->data)) {
$md5 = md5($this->data);
} else {
$mtime = time();
@@ -853,7 +853,7 @@ function sendChunk($chunk, $cType = null, $bound = null)
$this->sendHeaders();
}
- if ($this->data) {
+ if (isset($this->data)) {
while (($length -= $this->bufferSize) > 0) {
$this->flush(substr($this->data, $offset, $this->bufferSize));
$this->throttleDelay and $this->sleep();
@@ -1181,4 +1181,4 @@ function sleep()
}
}
-}
+}

0 comments on commit 3e198f8

Please sign in to comment.