Strict (2048): Declaration of EmailComponent::initialize() should be compatible with Component::initialize(Controller $controller) [duplicate]

廉价感情. 提交于 2019-11-26 23:43:06

问题


I upgraded my XAMPP version and installed PHP 5.5.9. After upgradetion I am getting this message. I googled it but not able to find clear idea to fix it. I got one link of stackoverflow , they are talking about signature of the initialize method, but didn't get exactly where I need to modify. Please guide me how to fix it.

Thank you in Advance.

Error:

Strict (2048): Declaration of EmailComponent::initialize() should be compatible with Component::initialize(Controller $controller) [APP\Controller\Component\EmailComponent.php, line 490] Code Context App::load() - CORE\Cake\Core\App.php, line 562 App::load() - CORE\Cake\Core\App.php, line 562 spl_autoload_call - [internal], line ?? class_exists - [internal], line ?? ComponentCollection::load() - CORE\Cake\Controller\ComponentCollection.php, line 100 ComponentCollection::init() - CORE\Cake\Controller\ComponentCollection.php, line 53 Controller::constructClasses() - CORE\Cake\Controller\Controller.php, line 635 Dispatcher::_invoke() - CORE\Cake\Routing\Dispatcher.php, line 183 Dispatcher::dispatch() - CORE\Cake\Routing\Dispatcher.php, line 162 [main] - APP\webroot\index.php, line 109

EmailComponent:


回答1:


Read the error message, it is very clear:

Strict (2048): Declaration of EmailComponent::initialize() should be compatible with Component::initialize(Controller $controller)

Your method signature doesn't match. Make them match.

function initialize(Controller $controller)


来源:https://stackoverflow.com/questions/22182482/strict-2048-declaration-of-emailcomponentinitialize-should-be-compatible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!