Strict(2048):EmailComponent :: initialize()的声明应该与Component :: initialize(Controller $ controller)兼容, [英] Strict (2048): Declaration of EmailComponent::initialize() should be compatible with Component::initialize(Controller $controller)
问题描述
我升级了XAMPP版本并安装了PHP 5.5.9。升级后我得到这个消息。我googled它,但不能找到清楚的想法来解决它。我有一个 stackoverflow 的链接,他们正在谈论签名的初始化方法,但没有得到我需要修改的地方。
错误:
strong>严格(2048):EmailComponent :: initialize()的声明应该与Component :: initialize(Controller $ controller)兼容[APP\Controller\ Component \EmailComponent.php,line 490]
代码上下文
App :: load() - CORE\Cake\Core\App.php,行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,第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,第162行
[main] - APP\webroot\index.php,第109行
EmailComponent :
阅读错误讯息非常清楚:
严格(2048):EmailComponent :: initialize()的声明应该是
兼容Component :: initialize(Controller $ controller)
您的方法签名不匹配。
function initialize(Controller $ controller)
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:
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)
这篇关于Strict(2048):EmailComponent :: initialize()的声明应该与Component :: initialize(Controller $ controller)兼容,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!