On Tue, 28 Jun 2011 07:52:06 +0100, Ivo Võsa <i...@insert.ee> wrote:

I think it's illogical or buggy. You're saying it's not set, but then you expect it to be set anyway.

If you have lazily-loaded properties, then you should simply return *true* from __isset() for such properties.

But think other way. __isset() returns true and then after that __get() returns NULL. I think that it is even more illogical.

It's not consistent with behavior of isset() indeed (it's more like property_exists(), which may be useful to some), but if you don't want that case to happen, it's up to you to implement __isset() correctly so that it doesn't happen. PHPTAL doesn't stop you from doing that.

regards, Kornel Lesiński

PHPTAL mailing list

Reply via email to