简体   繁体   English

哪个CakePHP版本与php 5.4兼容? (使用AjaxHelper生成错误)

[英]Which CakePHP version is compatible with php 5.4? (generating errors with AjaxHelper)

I have developed a website using CakePHP 2.4 and the server where i have uploaded website are using PHP 5.4. 我已经使用CakePHP 2.4开发了一个网站,并且我上载网站的服务器正在使用PHP 5.4。 Everything is working correcctly, but as i have used AjaxHelper and JavascriptHelper in the website. 一切都正常进行,但是因为我在网站上使用过AjaxHelper和JavascriptHelper。 It is generating warnings like: 它会生成如下警告:

Strict (2048): Declaration of JavascriptHelper::value() should be compatible with Helper::value($options = Array, $field = NULL, $key = 'value') [APP/View/Helper/JavascriptHelper.php, line 23]

Strict (2048): Declaration of JavascriptHelper::afterRender() should be compatible with Helper::afterRender($viewFile) [APP/View/Helper/JavascriptHelper.php, line 23]

Strict (2048): Declaration of AjaxHelper::afterRender() should be compatible with Helper::afterRender($viewFile) [APP/View/Helper/AjaxHelper.php, line 1398]

I am not clear as why is this happening? 我不清楚为什么会发生这种情况? Is there any problem regarding versions?? 版本有什么问题吗? Please help me. 请帮我。

as other already said, the message contains the proposal to change 就像其他人已经说过的那样,该消息包含更改建议

afterRender afterRender

into 进入

afterRender($viewFile) afterRender($ viewFile)

within in the file mentioned in the error message. 错误消息中提到的文件中。 Not that hard to understand :) 不难理解:)

l8erz l8erz

-d1g -d1g

http://api.cakephp.org/2.5/source-class-JsHelper.html#23-436 http://api.cakephp.org/2.5/source-class-JsHelper.html#23-436

Copy the jshelpercode and paste it into folder view/helper/JsHelper.php 复制jshelpercode并将其粘贴到文件夹view/helper/JsHelper.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM