Fix small bugs

git-svn-id: http://php-reader.googlecode.com/svn/branches/zend@169 51a70ab9-7547-0410-9469-37e369ee0574
This commit is contained in:
svollbehr
2010-03-06 18:17:56 +00:00
parent ebe67fdf7f
commit 089c866bc2
3 changed files with 11 additions and 4 deletions

View File

@@ -69,6 +69,9 @@ class Zend_Io_StringWriter extends Zend_Io_Writer
*/
public function toString()
{
if ($this->getSize() == 0) {
return '';
}
$offset = $this->getOffset();
$this->setOffset(0);
$data = fread($this->getFileDescriptor(), $this->getSize());