From 57e175552a07eb2de69aa2793ead734a7c35a3b7 Mon Sep 17 00:00:00 2001 From: LAV45 Date: Wed, 8 May 2013 18:10:02 +0300 Subject: [PATCH 1/3] The first rule of a template can not start with a "/", even if it has a default value --- framework/web/UrlRule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/web/UrlRule.php b/framework/web/UrlRule.php index 53bd747..96cb994 100644 --- a/framework/web/UrlRule.php +++ b/framework/web/UrlRule.php @@ -125,7 +125,7 @@ class UrlRule extends Object if (isset($this->defaults[$name])) { $length = strlen($match[0][0]); $offset = $match[0][1]; - if ($this->pattern[$offset - 1] === '/' && $this->pattern[$offset + $length] === '/') { + if ($offset > 1 && $this->pattern[$offset - 1] === '/' && $this->pattern[$offset + $length] === '/') { $tr["/<$name>"] = "(/(?P<$name>$pattern))?"; } else { $tr["<$name>"] = "(?P<$name>$pattern)?"; From 45e987d26c600b38bb52a48a1639e1795971076f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anderson=20M=C3=BCller?= Date: Wed, 8 May 2013 20:09:34 +0300 Subject: [PATCH 2/3] Typo in isNewRecord property of ActiveRecord --- 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 bf1f622..500029d 100644 --- a/framework/db/ActiveRecord.php +++ b/framework/db/ActiveRecord.php @@ -28,7 +28,7 @@ use yii\helpers\StringHelper; * @property TableSchema $tableSchema the schema information of the DB table associated with this AR class. * @property array $oldAttributes the old attribute values (name-value pairs). * @property array $dirtyAttributes the changed attribute values (name-value pairs). - * @property boolean $isPrimaryKey whether the record is new and should be inserted when calling [[save()]]. + * @property boolean $isNewRecord whether the record is new and should be inserted when calling [[save()]]. * @property mixed $primaryKey the primary key value. * @property mixed $oldPrimaryKey the old primary key value. * From 78b6607c11a9aeb810504213cb138965a10793f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anderson=20M=C3=BCller?= Date: Wed, 8 May 2013 19:14:35 +0200 Subject: [PATCH 3/3] Fixes doc block in findWith method of ActiveRelation --- framework/db/ActiveRelation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/db/ActiveRelation.php b/framework/db/ActiveRelation.php index 97e2a8c..42ae0e7 100644 --- a/framework/db/ActiveRelation.php +++ b/framework/db/ActiveRelation.php @@ -131,7 +131,7 @@ class ActiveRelation extends ActiveQuery /** * Finds the related records and populates them into the primary models. - * This method is internally by [[ActiveQuery]]. Do not call it directly. + * This method is internally used by [[ActiveQuery]]. Do not call it directly. * @param string $name the relation name * @param array $primaryModels primary models * @return array the related models