Skip to content

Commit

Permalink
Merge pull request #115 from iveoles/master
Browse files Browse the repository at this point in the history
Return NULL value for Undefined
  • Loading branch information
calcinai committed Nov 26, 2015
2 parents 6e83e38 + f60dfa5 commit 2974bc0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/XeroPHP/Remote/Object.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ public function fromStringArray($input_array, $replace_data = false) {
continue;
}

if(!isset($input_array[$property]))
if(!isset($input_array[$property])) {
$this->_data[$property] = null;
continue;
}

//Fix for an earlier assumption that the API didn't return more than two levels of nested objects.
//Handles Invoice > Contact > Address etc. in one build.
Expand Down

0 comments on commit 2974bc0

Please sign in to comment.