summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorctrlaltca <ctrlaltca@gmail.com>2016-02-04 06:26:05 +0100
committerctrlaltca <ctrlaltca@gmail.com>2016-02-04 06:26:05 +0100
commit4db58d8d7cdbf56f32c5644f90c7294c7ad0002d (patch)
tree8dea31b7e49a4c478e71e2443d05f5b0072bf61b /framework
parentffa39ce664055966bab396631bb298091f1d2034 (diff)
parent275f16b90a92c62935cb691d11e0bd124acf64e4 (diff)
Merge pull request #564 from majuca/master
Return null when keys is null and don't throw an exception
Diffstat (limited to 'framework')
-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);