严格 (2048):EmailComponent::initialize() 的声明应与 Component::initialize(Controller $controller) 兼容 [英] Strict (2048): Declaration of EmailComponent::initialize() should be compatible with Component::initialize(Controller $controller)

查看:40
本文介绍了严格 (2048):EmailComponent::initialize() 的声明应与 Component::initialize(Controller $controller) 兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我升级了我的 XAMPP 版本并安装了 PHP 5.5.9.升级后,我收到此消息.我用谷歌搜索但找不到明确的想法来解决它.我得到了一个 stackoverflow 的链接,他们正在谈论initialize 方法,但没有得到我需要修改的确切位置.请指导我如何修复它.

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.

提前致谢.

错误:

Strict (2048):EmailComponent::initialize() 的声明应该与 Component::initialize(Controller $controller) [APPControllerComponentEmailComponent.php, line 490] 兼容代码上下文App::load() - CORECakeCoreApp.php,第 562 行App::load() - CORECakeCoreApp.php,第 562 行spl_autoload_call - [内部],行 ??class_exists - [内部],行 ??ComponentCollection::load() - CORECakeControllerComponentCollection.php,第 100 行ComponentCollection::init() - CORECakeControllerComponentCollection.php,第 53 行Controller::constructClasses() - CORECakeControllerController.php,第 635 行Dispatcher::_invoke() - CORECakeRoutingDispatcher.php,第 183 行Dispatcher::dispatch() - CORECakeRoutingDispatcher.php,第 162 行[main] - APPwebrootindex.php,第 109 行

Strict (2048): Declaration of EmailComponent::initialize() should be compatible with Component::initialize(Controller $controller) [APPControllerComponentEmailComponent.php, line 490] Code Context App::load() - CORECakeCoreApp.php, line 562 App::load() - CORECakeCoreApp.php, line 562 spl_autoload_call - [internal], line ?? class_exists - [internal], line ?? ComponentCollection::load() - CORECakeControllerComponentCollection.php, line 100 ComponentCollection::init() - CORECakeControllerComponentCollection.php, line 53 Controller::constructClasses() - CORECakeControllerController.php, line 635 Dispatcher::_invoke() - CORECakeRoutingDispatcher.php, line 183 Dispatcher::dispatch() - CORECakeRoutingDispatcher.php, line 162 [main] - APPwebrootindex.php, line 109

电子邮件组件:

推荐答案

看了报错信息,很清楚:

Read the error message, it is very clear:

Strict (2048):EmailComponent::initialize() 的声明应该是兼容 Component::initialize(Controller $controller)

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)

这篇关于严格 (2048):EmailComponent::initialize() 的声明应与 Component::initialize(Controller $controller) 兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆