From: Platonides Date: Thu, 24 Jun 2010 12:19:42 +0000 (+0000) Subject: Follow up r66267. X-Git-Tag: 1.31.0-rc.0~36401 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=a7a246f6d27c6e93a1a93683164b25f2a7424979;p=lhc%2Fweb%2Fwiklou.git Follow up r66267. The length of strings is given by strlen, not count. It's strange that this worked before. Although for big files it gave a String size overflow fatal error. --- diff --git a/includes/ImportXMLReader.php b/includes/ImportXMLReader.php index d445a28365..74183f3389 100644 --- a/includes/ImportXMLReader.php +++ b/includes/ImportXMLReader.php @@ -660,17 +660,17 @@ class UploadSourceAdapter { $leave = false; while ( !$leave && !$this->mSource->atEnd() && - count($this->mBuffer) < $count ) { + strlen($this->mBuffer) < $count ) { $read = $this->mSource->readChunk(); - if ( !count($read) ) { + if ( !strlen($read) ) { $leave = true; } $this->mBuffer .= $read; } - if ( count($this->mBuffer) ) { + if ( strlen($this->mBuffer) ) { $return = substr( $this->mBuffer, 0, $count ); $this->mBuffer = substr( $this->mBuffer, $count ); }