Used ->find(true) on wrong object

This commit is contained in:
Mikael Nordfeldth 2015-03-04 13:46:51 +01:00
parent 9720fd8250
commit 22dbeaef29

View File

@ -63,7 +63,7 @@ class ImageFile
if (!empty($this->id)) {
$this->fileRecord = new File();
$this->fileRecord->id = $this->id;
if (!$this->find(true)) {
if (!$this->fileRecord->find(true)) {
// If we have set an ID, we need that ID to exist!
throw new NoResultException($this->fileRecord);
}