diff options
author | ctrlaltca <ctrlaltca@gmail.com> | 2016-02-04 06:26:05 +0100 |
---|---|---|
committer | ctrlaltca <ctrlaltca@gmail.com> | 2016-02-04 06:26:05 +0100 |
commit | 4db58d8d7cdbf56f32c5644f90c7294c7ad0002d (patch) | |
tree | 8dea31b7e49a4c478e71e2443d05f5b0072bf61b /framework/Data | |
parent | ffa39ce664055966bab396631bb298091f1d2034 (diff) | |
parent | 275f16b90a92c62935cb691d11e0bd124acf64e4 (diff) |
Merge pull request #564 from majuca/master
Return null when keys is null and don't throw an exception
Diffstat (limited to 'framework/Data')
-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); |