Tweak to php-gettext stream reader; initialize local variable before appending data to it to avoid triggering an E_NOTICE message.

This commit is contained in:
Brion Vibber 2009-08-18 21:02:46 -07:00 committed by Craig Andrews
parent 5c21a371d6
commit 8bca90b8d2
1 changed files with 1 additions and 0 deletions

View File

@ -108,6 +108,7 @@ class FileReader {
// PHP 5.1.1 does not read more than 8192 bytes in one fread()
// the discussions at PHP Bugs suggest it's the intended behaviour
$data = '';
while ($bytes > 0) {
$chunk = fread($this->_fd, $bytes);
$data .= $chunk;