From 611434992a349fb69507a625929f98f61656feef Mon Sep 17 00:00:00 2001 From: dweatherford Date: Fri, 16 Nov 2007 03:29:47 +0000 Subject: [PATCH] [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 --- lib/php/src/Thrift.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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])) { -- 2.17.1