From: dweatherford Date: Fri, 16 Nov 2007 03:29:47 +0000 (+0000) Subject: [thrift] Fix extension deserialization call with no classname X-Git-Tag: 0.2.0~1125 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=611434992a349fb69507a625929f98f61656feef;p=common%2Fthrift.git [thrift] Fix extension deserialization call with no classname Summary: The extension expects a classname as a string and does not allow null; use the empty string instead of null in the absence of a classname to pass. Reviewed By: mcslee Test Plan: php -l Revert: svn git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665347 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/php/src/Thrift.php b/lib/php/src/Thrift.php index fdec97f8..10728a17 100644 --- a/lib/php/src/Thrift.php +++ b/lib/php/src/Thrift.php @@ -220,7 +220,7 @@ class TException extends Exception { if ($ftype == $fspec['type']) { $xfer = 0; if ($fast_binary) { - $class = isset($fspec['class']) ? $fspec['class'] : null; + $class = isset($fspec['class']) ? $fspec['class'] : ''; $this->$var = thrift_protocol_binary_deserialize($ftype, $input, $class); } else { if (isset(TBase::$tmethod[$ftype])) { @@ -567,7 +567,7 @@ abstract class TBase { if ($ftype == $fspec['type']) { $xfer = 0; if ($fast_binary) { - $class = isset($fspec['class']) ? $fspec['class'] : null; + $class = isset($fspec['class']) ? $fspec['class'] : ''; $this->$var = thrift_protocol_binary_deserialize($ftype, $input, $class); } else { if (isset(TBase::$tmethod[$ftype])) {