From 275f16b90a92c62935cb691d11e0bd124acf64e4 Mon Sep 17 00:00:00 2001 From: Jean-Luc Gyger Date: Tue, 2 Feb 2016 21:48:21 +0100 Subject: Return null when keys is null and don't throw an exception --- framework/Data/ActiveRecord/TActiveRecord.php | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit v1.2.3