Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with CakePHP 2.x #8

Open
NEOSolutions opened this issue Jan 5, 2013 · 1 comment
Open

Compatibility with CakePHP 2.x #8

NEOSolutions opened this issue Jan 5, 2013 · 1 comment

Comments

@NEOSolutions
Copy link

I got this errors when I enable the plugin:

Strict (2048): Declaration of BlogSetting::afterSave() should be compatible with Model::afterSave($created) [APP\Plugin\Blog\Model\BlogSetting.php, line 10]
Strict (2048): Declaration of BlogPost::afterSave() should be compatible with Model::afterSave($created) [APP\Plugin\Blog\Model\BlogPost.php, line 435]
Strict (2048): Declaration of HabtmCounterCacheBehavior::setup() should be compatible with ModelBehavior::setup(Model $model, $config = Array) [APP\Plugin\habtm_counter_cache\Model\Behavior\HabtmCounterCacheBehavior.php, line 27]
Strict (2048): Declaration of HabtmCounterCacheBehavior::beforeSave() should be compatible with ModelBehavior::beforeSave(Model $model) [APP\Plugin\habtm_counter_cache\Model\Behavior\HabtmCounterCacheBehavior.php, line 27]
Strict (2048): Declaration of HabtmCounterCacheBehavior::afterSave() should be compatible with ModelBehavior::afterSave(Model $model, $created) [APP\Plugin\habtm_counter_cache\Model\Behavior\HabtmCounterCacheBehavior.php, line 27]
Strict (2048): Declaration of HabtmCounterCacheBehavior::beforeDelete() should be compatible with ModelBehavior::beforeDelete(Model $model, $cascade = true) [APP\Plugin\habtm_counter_cache\Model\Behavior\HabtmCounterCacheBehavior.php, line 27]
Strict (2048): Declaration of HabtmCounterCacheBehavior::afterDelete() should be compatible with ModelBehavior::afterDelete(Model $model) [APP\Plugin\habtm_counter_cache\Model\Behavior\HabtmCounterCacheBehavior.php, line 27]

@flashios09
Copy link

1- open the plugin file
2- find "public function setup(&$model, $config = null)" and change it with "public function setup(Model $model, $config = null)" -> just change the '&' character with the word 'Model'
3- repeat this manipulation to the other callback (afterSave, afterDelete ...)
that's all talks ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant