Skip to content

Commit c4b67dd

Browse files
committed
Add a check if the object exists or not
1 parent 4dec4e0 commit c4b67dd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Application.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ public function getNextObjectId()
195195
*/
196196
public function getObject($id)
197197
{
198-
// @todo: Check if the object exists
199-
return $this->objects[$id];
198+
return (isset($this->objects[$id]) && $this->objects[$id] !== null) ? $this->objects[$id] : null;
200199
}
201200

202201
/**

0 commit comments

Comments
 (0)