2
Strict (2048): Declaration of MeioUploadBehavior::setup() should be compatible with ModelBehavior::setup(Model $model, $config = Array) [APP/Plugin/MeioUpload/Model/Behavior/MeioUploadBehavior.php, line 26]

Strict (2048): Declaration of MeioUploadBehavior::beforeValidate() should be compatible with ModelBehavior::beforeValidate(Model $model) [APP/Plugin/MeioUpload/Model/Behavior/MeioUploadBehavior.php, line 26]

Strict (2048): Declaration of MeioUploadBehavior::beforeSave() should be compatible with ModelBehavior::beforeSave(Model $model) [APP/Plugin/MeioUpload/Model/Behavior/MeioUploadBehavior.php, line 26]

Strict (2048): Declaration of MeioUploadBehavior::afterSave() should be compatible with ModelBehavior::afterSave(Model $model, $created) [APP/Plugin/MeioUpload/Model/Behavior/MeioUploadBehavior.php, line 26]

Strict (2048): Declaration of MeioUploadBehavior::beforeDelete() should be compatible with ModelBehavior::beforeDelete(Model $model, $cascade = true) [APP/Plugin/MeioUpload/Model/Behavior/MeioUploadBehavior.php, line 26]

Strict (2048): Declaration of MeioUploadBehavior::afterDelete() should be compatible with ModelBehavior::afterDelete(Model $model) [APP/Plugin/MeioUpload/Model/Behavior/MeioUploadBehavior.php, line 26]
4

2 回答 2

5

的方法签名MeioUploadBehavior必须与类的方法签名相同ModelBehavior

例如,方法的方法签名afterDelete必须从 更改function afterDelete(&$model)function afterDelete(Model $model)

于 2012-07-27T06:12:07.753 回答
4

更改文件 MeioUploadBehavior

function beforeValidate(Model $model)
function beforeSave(Model $model)
function afterSave(Model $model, $created)

经过:

function beforeValidate(Model $model, $options = array())
function beforeSave(Model $model, $options = array())
function afterSave(Model $model, $created, $options = array())

此更正是由于 CakePHP 版本所做的更改。

问候

@jvo_chile

于 2013-10-24T23:54:59.140 回答