Re: Access to incomplete object should not be a fatal
| From: | Yasuo Ohgaki | Date: | Tue, 23 Jul 2002 11:06:24 +0000 |
| Subject: | Re: Access to incomplete object should not be a fatal | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-86115@lists.php.net to get a copy of this message | ||
derick@php.net wrote:
> On Tue, 23 Jul 2002, Yasuo Ohgaki wrote:
>
>
>>It seems accessing incoplete object became fatal error.
>>
>>----
>>Fatal error: The script tried to execute a method or access a property
>>of an incomplete object. Please ensure that the class definition auth of
>>the object you are trying to operate on was loaded _before_ the session
>>was started in
>>----
>>
>>This breaks my session data manager and makes the manager unusable.
>>I'm listing incomplete object properties for administrative purpose.
>>
>>Any comments?
>
>
> Uhm... of course this should give you an E_ERROR, it's simply not
> possible to call a method of an object that's only a half baken one.
>
> This should stay an E_ERROR.
You must be too tired.
Accessing object properties in session database, _NOT_ method.
It should be able to access properties. Otherwise, users
aren't able to write session data admin apps with PHP.
It also possible users may have application intentionally
using incomplete object because complete object is not needed
for the page. Thus, current code may break these optimized scripts.
Therefore, I think it may be ok with E_NOTICE instead of E_WARNING.
Anyway, here is a patch to make is_object() return false for
incomplete objects.
Any comments?
--
Yasuo Ohgaki