2011-08-17 114 views
0

我有下面的代码,我试图理解并找到这个错误的解决方案。调用成员函数

A PHP Error was encountered 

Severity: Notice 

Message: Undefined property: Tank_auth::$users 

Filename: libraries/Tank_auth.php 

Line Number: 188 

Fatal error: Call to a member function UpdateProfileInfo() on a non-object in /home/xtremer/public_html/kowmanager/application/libraries/Tank_auth.php on line 188 

坦克验证控制器:http://pastebin.com/iRj11hgR 坦克验证型号:http://pastebin.com/qhNK5Whz 坦克验证库:http://pastebin.com/RVxdzhUa

编辑:多亏了马克,他能找到这个问题,但我有一个新的问题很奇怪。

A PHP Error was encountered 

Severity: Notice 

Message: Undefined index: userID 

Filename: libraries/Tank_auth.php 

Line Number: 188 
A PHP Error was encountered 

Severity: Warning 

Message: Cannot modify header information - headers already sent by (output started at /home/xtremer/public_html/system/core/Exceptions.php:170) 

Filename: libraries/Session.php 

Line Number: 671 
A PHP Error was encountered 

Severity: Warning 

Message: Cannot modify header information - headers already sent by (output started at /home/xtremer/public_html/system/core/Exceptions.php:170) 

Filename: helpers/url_helper.php 

Line Number: 543 
+1

它看起来不像'application/libraries/Tank_auth.php'有188行? – ChrisA

+1

您粘贴的任何代码示例中没有任何$用户,并且没有任何代码示例中有第188行。您对我们持怀疑态度...... –

+0

我只是试图给出相关代码,无论如何也无法帮助任何人。 –

回答

1

可能相关:

行187:$this->ci->users
行188:$this->users->UpdateProfileInfo(...);

坦克验证库忘了->ci

+0

那么解决了一件事。有趣的是,我得到一个问题修复,另一个问题被发现。我的新错误是在我的文章。 –

+0

还有什么想法萌芽? –

+1

PHP数组键区分大小写。也许它是'user_id'或'userid',而不是'userID?'很难说。修正未定义的索引警告后,标题错误/警告应该消失。 –

1

看起来您的tank_auth/users.php模型没有加载,或者某处存在命名冲突。你的$ autoload数组是什么样的?

+0

$ autoload ['libraries'] = array('database','template','asset','session'); –