Bogus $this->type in TApplicationException in PHP
authorMark Slee <mcslee@apache.org>
Tue, 27 Feb 2007 22:11:09 +0000 (22:11 +0000)
committerMark Slee <mcslee@apache.org>
Tue, 27 Feb 2007 22:11:09 +0000 (22:11 +0000)
Reviewed By: php

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665027 13f79535-47bb-0310-9956-ffa450edef68

lib/php/src/Thrift.php

index 8118e3b..5fa57f0 100644 (file)
@@ -97,7 +97,7 @@ class TApplicationException extends TException {
       $xfer += $output->writeString($this->getMessage());
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->type !== null) {
+    if ($this->getCode()) {
       $xfer += $output->writeFieldBegin('type', TType::I32, 2);
       $xfer += $output->writeI32($this->getCode());
       $xfer += $output->writeFieldEnd();