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]
答案 0 :(得分:5)
MeioUploadBehavior
的方法签名必须与ModelBehavior
类的方法签名相同。
例如,afterDelete
方法的方法签名必须从function afterDelete(&$model)
更改为function afterDelete(Model $model)
。
答案 1 :(得分: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