Permalink
Browse files

Making sure that all properties are obtained only when asked for

  • Loading branch information...
mariano committed Jan 6, 2012
1 parent 0022d79 commit bcbd53cb55a55c78329e28bb2b6919916eaf777b
Showing with 1 addition and 1 deletion.
  1. +1 −1 models/BaseEntity.php
View
@@ -203,7 +203,7 @@ protected function _getData($allProperties = false) {
$method = 'get' . Inflector::camelize($field);
if (method_exists($this, $method) && is_callable(array($this, $method))) {
$data[$field] = $this->{$method}();
- } elseif (property_exists($this, $field)) {
+ } elseif ($allProperties && property_exists($this, $field)) {
$data[$field] = $this->{$field};
}
}

0 comments on commit bcbd53c

Please sign in to comment.