Bogus $this->type in TApplicationException in PHP
Reviewed By: php
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665027 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/php/src/Thrift.php b/lib/php/src/Thrift.php
index 8118e3b..5fa57f0 100644
--- a/lib/php/src/Thrift.php
+++ b/lib/php/src/Thrift.php
@@ -97,7 +97,7 @@
$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();