Kohana3 - ErrorException [注意]:未定义索引:id - 调用 Auth::instance() 时出错
我现在在使用最新版本的 KohanaPHP (kohanaphp.com) 时遇到了问题。
在我注册并登录到我的测试页面后,几分钟后,现在出现错误:
ErrorException [Notice]:未定义的索引:id
MODPATH/orm/classes/kohana/orm.php [ 1316 ]
1311 *
1312 * @return mixed primary key
1313 */
1314 public function pk()
1315 {
1316 return $this->_object[$this->_primary_key];
1317 }
1318
1319 /**
1320 * Returns whether or not primary key is empty
1321 *
我在Google中搜索了很多,但是我从未找到答案,现在的问题是,我无法重新登录以获得新实例,因为我必须再次调用 Auth::instance()->login() ,而 Auth::instance() 不是可调用。
现在该怎么办,我该如何修复它,是否已经有新版本的 ORM 或 Auth 模块?
谢谢大家 艾哈迈德
I've now a Problem with the newest Version of KohanaPHP (kohanaphp.com).
After I've registered me and logged in into my test page, some minutes later, there is now the error:
ErrorException [ Notice ]: Undefined index: id
MODPATH/orm/classes/kohana/orm.php [ 1316 ]
1311 *
1312 * @return mixed primary key
1313 */
1314 public function pk()
1315 {
1316 return $this->_object[$this->_primary_key];
1317 }
1318
1319 /**
1320 * Returns whether or not primary key is empty
1321 *
I've searched a lot in Google, but i never found an answer, the Problem now is, that I cant reloggin to get a new instance, because I've to call Auth::instance()->login() again, and Auth::instance() is not callable.
Whats todo now, how can I fix it, is there already a new Version of ORM or Auth Module?
Thanks everybody
Ahmet
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该错误发生在致命错误(任何地方)之后,但我认为它只发生在旧版本的 Kohana3 中。发生这种情况后删除您的 cookie。
尝试再次下载最新版本的 Kohana 3
编辑:
您可以获得有关此错误的更多信息< a href="http://forum.kohanaframework.org/comments.php?DiscussionID=4606&Focus=34920" rel="nofollow noreferrer">此处
That error occurs after a fatal error ( anywhere ), but I think it happens only in older versions of Kohana3. Delete your cookies after this occurs.
Try downloading the latest version of Kohana 3 again
EDIT:
You can get more info on this bug here