Skip to content

Commit 97f20c2

Browse files
duhowavbdr
authored andcommitted
FIX #626: dbObject not finding relations (#667)
1 parent 8afa946 commit 97f20c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dbObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ protected function get ($limit = null, $fields = null) {
383383
* @return dbObject
384384
*/
385385
private function with ($objectName) {
386-
if (!property_exists ($this, 'relations') && !isset ($this->relations[$name]))
386+
if (!property_exists ($this, 'relations') || !isset ($this->relations[$objectName]))
387387
die ("No relation with name $objectName found");
388388

389389
$this->_with[$objectName] = $this->relations[$objectName];

0 commit comments

Comments
 (0)