From a7a246f6d27c6e93a1a93683164b25f2a7424979 Mon Sep 17 00:00:00 2001 From: Platonides Date: Thu, 24 Jun 2010 12:19:42 +0000 Subject: [PATCH] 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. --- includes/ImportXMLReader.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ); } -- 2.20.1