From 260a5fa08e87643bd5c001cc25311e9074795cfc Mon Sep 17 00:00:00 2001 From: eletuchy Date: Wed, 13 Feb 2008 22:41:03 +0000 Subject: [PATCH] [thrift] grrrr ... TPhpStream can read the string '0' Summary: php sucks Reviewed By: mcslee Test Plan: thrift call with string '0' has same behavior as string '1' Revert Plan: sure git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665477 13f79535-47bb-0310-9956-ffa450edef68 --- lib/php/src/transport/TPhpStream.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/php/src/transport/TPhpStream.php b/lib/php/src/transport/TPhpStream.php index d4646f1a..d1350d71 100644 --- a/lib/php/src/transport/TPhpStream.php +++ b/lib/php/src/transport/TPhpStream.php @@ -70,7 +70,7 @@ class TPhpStream extends TTransport { public function read($len) { $data = @fread($this->inStream_, $len); - if (!$data) { + if ($data === FALSE || $data === '') { throw new TException('TPhpStream: Could not read '.$len.' bytes'); } return $data; -- 2.17.1