Check if field exists, value can be zero or null
authorJeffrey Reichardt <jeffrey.reichardt@googlemail.com>
Thu, 27 Dec 2012 21:48:01 +0000 (22:48 +0100)
committerJeffrey Reichardt <jeffrey.reichardt@googlemail.com>
Thu, 27 Dec 2012 21:48:01 +0000 (22:48 +0100)
wcfsetup/install/files/lib/action/APIAction.class.php

index b1d3053891d24a571d536de1c209e169633f88ee..c88a25643f49883f01f581528cf1dd6b223cc2b1 100644 (file)
@@ -82,7 +82,7 @@ final class APIAction extends AbstractAjaxAction {
                $prunedArray = array();
                
                foreach ($object->getResponseFields() as $fieldName) {
-                       if ($object->$fieldName) {
+                       if (isset($object->$fieldName)) {
                                $prunedArray[$fieldName] = $object->$fieldName;
                        }
                }