Cakephp 升级 php 版本显示错误
Cakephp upgrade php version showing error
我刚刚将我的服务器升级到 PHP 5.4 并在加载项目时出现此错误,该项目在旧版本中运行良好
Declaration of JsHelper::link() should be compatible with AppHelper::link($title, $url = NULL, $options = Array, $confirmMessage = false) [CORE\Cake\View\Helper\JsHelper.php, line 434]
我在 window
中使用 xampp
请告诉我如何解决
阅读错误信息
Declaration of JsHelper::link() should be compatible with AppHelper::link($title, $url = NULL, $options = Array, $confirmMessage = false) [CORE\Cake\View\Helper\JsHelper.php, line 434]
再看the method signature for that method in the core:
// JsHelper
link($title, $url = null, $options = array())
然后看警告中的方法签名:
//AppHelper
link($title, $url = NULL, $options = Array, $confirmMessage = false)
然后再看警告,说他们不匹配。
解决方案
更改应用程序中的 AppHelper class,使其具有相同的方法签名:
//AppHelper
link($title, $url = NULL, $options = Array)
并相应地调整它包含的任何逻辑。
我刚刚将我的服务器升级到 PHP 5.4 并在加载项目时出现此错误,该项目在旧版本中运行良好
Declaration of JsHelper::link() should be compatible with AppHelper::link($title, $url = NULL, $options = Array, $confirmMessage = false) [CORE\Cake\View\Helper\JsHelper.php, line 434]
我在 window
中使用 xampp请告诉我如何解决
阅读错误信息
Declaration of JsHelper::link() should be compatible with AppHelper::link($title, $url = NULL, $options = Array, $confirmMessage = false) [CORE\Cake\View\Helper\JsHelper.php, line 434]
再看the method signature for that method in the core:
// JsHelper
link($title, $url = null, $options = array())
然后看警告中的方法签名:
//AppHelper
link($title, $url = NULL, $options = Array, $confirmMessage = false)
然后再看警告,说他们不匹配。
解决方案
更改应用程序中的 AppHelper class,使其具有相同的方法签名:
//AppHelper
link($title, $url = NULL, $options = Array)
并相应地调整它包含的任何逻辑。