diff options
author | Jean-Luc Gyger <jgyger7@gmail.com> | 2016-02-02 21:48:21 +0100 |
---|---|---|
committer | Jean-Luc Gyger <jgyger7@gmail.com> | 2016-02-02 21:48:21 +0100 |
commit | 275f16b90a92c62935cb691d11e0bd124acf64e4 (patch) | |
tree | 8dea31b7e49a4c478e71e2443d05f5b0072bf61b /framework/Data/ActiveRecord | |
parent | ffa39ce664055966bab396631bb298091f1d2034 (diff) |
Return null when keys is null and don't throw an exception
Diffstat (limited to 'framework/Data/ActiveRecord')
-rw-r--r-- | framework/Data/ActiveRecord/TActiveRecord.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/framework/Data/ActiveRecord/TActiveRecord.php b/framework/Data/ActiveRecord/TActiveRecord.php index d37e5208..186af859 100644 --- a/framework/Data/ActiveRecord/TActiveRecord.php +++ b/framework/Data/ActiveRecord/TActiveRecord.php @@ -612,6 +612,8 @@ abstract class TActiveRecord extends TComponent */ public function findByPk($keys) { + if($keys === null) + return null; if(func_num_args() > 1) $keys = func_get_args(); $data = $this->getRecordGateway()->findRecordByPK($this,$keys); |