TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   Strange Notice Error ..... (http://www.talkphp.com/general/4915-strange-notice-error.html)

ioan1k 08-30-2009 04:36 AM

Strange Notice Error .....
 
Hello!

I have debugged this problem for quite sometime now and cannot fix this damn notice error.

The errors I receive are
Code:

Notice:  Use of undefined constant object - assumed 'object' in /var/www/unus/library/Acl/Role.php on line 45

Notice:  Use of undefined constant object - assumed 'object' in /var/www/unus/library/Acl/Resource.php on line 45

Turning Notice errors off is not the answer ....

Here is the code, the setData method is just a object that holds data information in key => value mapping

php Code:
// Role.php
public function __construct()
{
    $this->setData('acl', new Unus_Role());
}
// Resource.php
public function __construct()
{
    $this->setData('acl', new Unus_Resource());
}

As far as I can tell from this is somehow, someway it is seeing the Object as a constant and finding it undefined... this happens is php 5.2 and 5.3 (maybe its a bug)

TheOnly92 08-30-2009 06:33 AM

The error message as I interpret is that it's saying that you are using an undefined constant called object, but the PHP interpreter will assume that you mean 'object' (with the quotes). But I don't see "object" anywhere?

ioan1k 08-30-2009 01:37 PM

Fixed this issue .... PHP was sending the wrong file and line, and it was in a child class that this error was being called from ... gotta love PHP's error reporting...


All times are GMT. The time now is 06:10 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0