我有這個助手的一個問題:https://github.com/kshakirov/cakephp-lang-helperCakePHP的國家幫手
這個助手給我這個錯誤,我沒有找到原因:
Fatal Error
Error: Call to a member function input() on a non-object
File: \app\View\Helper\LangHelper.php
Line: 670
我有這個助手的一個問題:https://github.com/kshakirov/cakephp-lang-helperCakePHP的國家幫手
這個助手給我這個錯誤,我沒有找到原因:
Fatal Error
Error: Call to a member function input() on a non-object
File: \app\View\Helper\LangHelper.php
Line: 670
我猜問題是,LangHelper覆蓋父__construct
方法,防止蛋糕從正確設置助手。將LangHelper的__construct()
更改爲以下內容:
public function __construct(View $View, $settings = array()) {
parent::__construct($View, $settings);
$this->mapper = $this->parseLangHeaders();
$this->langCode = $this->findLangCode();
$this->countryCode = $this->findCountryCode();
}
非常感謝Ben,現在沒事了) – Kamduras
你激活的AppController
的FormHelper
?
App::uses('FormHelper', 'View/Helper'); // Don't forget this one in Cake 2.x
class AppController extends Controller
{
public
$helpers = array('Form');
}
該插件已超過一年的時間 - 您使用的是什麼版本的蛋糕? – Ross
看起來像依賴性問題 – Ariaan