summaryrefslogtreecommitdiff
path: root/framework/Data/ActiveRecord
diff options
context:
space:
mode:
authorJean-Luc Gyger <jgyger7@gmail.com>2016-02-02 21:48:21 +0100
committerJean-Luc Gyger <jgyger7@gmail.com>2016-02-02 21:48:21 +0100
commit275f16b90a92c62935cb691d11e0bd124acf64e4 (patch)
tree8dea31b7e49a4c478e71e2443d05f5b0072bf61b /framework/Data/ActiveRecord
parentffa39ce664055966bab396631bb298091f1d2034 (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.php2
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);