Fixed problem when nameToID returns no results.
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@282 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -95,8 +95,11 @@ class AppModel extends Model {
|
|||||||
'conditions' => compact('name'),
|
'conditions' => compact('name'),
|
||||||
));
|
));
|
||||||
$this->cacheQueries = false;
|
$this->cacheQueries = false;
|
||||||
$item = current($item);
|
if ($item) {
|
||||||
return $item['id'];
|
$item = current($item);
|
||||||
|
return $item['id'];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user