Skip to content

Commit

Permalink
Fix chaining properties error: #10
Browse files Browse the repository at this point in the history
  • Loading branch information
aginev committed Apr 30, 2018
1 parent fe1b423 commit 9f3fef5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Rows/ModelRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ public function __get($key) {

// The easiest way to chain the object properties
foreach ($keys as $key) {
$value = $value->{$key};
}
try {
$value = $value->{$key};
} catch (\Exception $e) {
$value = '';
break;
}
}

return $value;
}
Expand Down

0 comments on commit 9f3fef5

Please sign in to comment.