Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meio Upload Strict Errors

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]
like image 713
Bruno Rocha Avatar asked Jul 12 '26 14:07

Bruno Rocha


2 Answers

The method signatures of the MeioUploadBehavior must be the same as those of the ModelBehavior class.

For example, the method signature of the afterDelete method must be changed from function afterDelete(&$model) to function afterDelete(Model $model).

like image 176
dhofstet Avatar answered Jul 15 '26 14:07

dhofstet


Change the file MeioUploadBehavior

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

by:

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

This correction is due to changes made ​​by CakePHP Version.

Greeting

@jvo_chile

like image 34
user2918013 Avatar answered Jul 15 '26 16:07

user2918013