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. * 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 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)?";