mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Fixed yii\db\BaseActiveRecord::deleteAll()
changes method signature declared by yii\db\ActiveRecordInterface::deleteAll()
This commit is contained in:
@ -4,7 +4,7 @@ Yii Framework 2 Change Log
|
||||
2.0.12 under development
|
||||
--------------------------
|
||||
|
||||
- no changes in this release.
|
||||
- Bug #13538: Fixed `yii\db\BaseActiveRecord::deleteAll()` changes method signature declared by `yii\db\ActiveRecordInterface::deleteAll()` (klimov-paul)
|
||||
|
||||
|
||||
2.0.11.2 February 08, 2017
|
||||
|
@ -288,7 +288,7 @@ class ActiveRecord extends BaseActiveRecord
|
||||
* @param array $params the parameters (name => value) to be bound to the query.
|
||||
* @return int the number of rows deleted
|
||||
*/
|
||||
public static function deleteAll($condition = '', $params = [])
|
||||
public static function deleteAll($condition = null, $params = [])
|
||||
{
|
||||
$command = static::getDb()->createCommand();
|
||||
$command->delete(static::tableName(), $condition, $params);
|
||||
|
@ -192,11 +192,10 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
|
||||
*
|
||||
* @param string|array $condition the conditions that will be put in the WHERE part of the DELETE SQL.
|
||||
* Please refer to [[Query::where()]] on how to specify this parameter.
|
||||
* @param array $params the parameters (name => value) to be bound to the query.
|
||||
* @return int the number of rows deleted
|
||||
* @throws NotSupportedException if not overrided
|
||||
* @throws NotSupportedException if not overridden.
|
||||
*/
|
||||
public static function deleteAll($condition = '', $params = [])
|
||||
public static function deleteAll($condition = null)
|
||||
{
|
||||
throw new NotSupportedException(__METHOD__ . ' is not supported.');
|
||||
}
|
||||
|
Reference in New Issue
Block a user