mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-22 01:30:23 +08:00
removed get() shortcut from find()
This commit is contained in:
@@ -66,14 +66,6 @@ class ActiveRecord extends BaseActiveRecord
|
||||
{
|
||||
$query = static::createQuery();
|
||||
if (is_array($q)) {
|
||||
if (count($q) == 1 && (array_key_exists(ActiveRecord::PRIMARY_KEY_NAME, $q)) && $query->where === null) {
|
||||
$pk = $q[ActiveRecord::PRIMARY_KEY_NAME];
|
||||
if (is_array($pk)) {
|
||||
return static::mget($pk);
|
||||
} else {
|
||||
return static::get($pk);
|
||||
}
|
||||
}
|
||||
return $query->andWhere($q)->one();
|
||||
} elseif ($q !== null) {
|
||||
return static::get($q);
|
||||
|
||||
Reference in New Issue
Block a user