From 37f3a400cd782cd1009344e2e44ffecc1a09d7fb Mon Sep 17 00:00:00 2001 From: Alexander Kochetov Date: Tue, 7 May 2013 18:36:38 +0400 Subject: [PATCH] ActiveRecord::getRelation() bugfix --- framework/db/ActiveRecord.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/db/ActiveRecord.php b/framework/db/ActiveRecord.php index 709d139..feb4c02 100644 --- a/framework/db/ActiveRecord.php +++ b/framework/db/ActiveRecord.php @@ -1131,8 +1131,8 @@ class ActiveRecord extends Model return $relation; } } catch (UnknownMethodException $e) { + throw new InvalidParamException(get_class($this) . ' has no relation named "' . $name . '".'); } - throw new InvalidParamException(get_class($this) . ' has no relation named "' . $name . '".'); } /**