Skip to content

Commit 3bdeff2

Browse files
committed
Merge pull request #16 from berni2288/master-fixpropertyerror
Fixes uncaught RuntimeException 'Property "xyz" does not exist
2 parents 94ac618 + 2d52109 commit 3bdeff2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Gitlab/Model/AbstractModel.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ public function hydrate(array $data = array())
3535
{
3636
if (!empty($data)) {
3737
foreach ($data as $k => $v) {
38-
$this->$k = $v;
38+
if (in_array($k, static::$_properties)) {
39+
$this->$k = $v;
40+
}
3941
}
4042
}
4143

0 commit comments

Comments
 (0)