Ticket #942 (closed defect: wontfix)

Opened 2 years ago

Last modified 10 months ago

property_exists('midgard_article', 'name') returns false

Reported by: rambo Assigned to: piotras
Priority: major Milestone: 8.09.7 Ragnaroek
Component: Midgard PHP Version: 8.09 Ragnaroek
Keywords: Cc:

Description

But if I use an empty article instance in stead of class name it works.

Change History

03/09/09 16:02:05 changed by piotras

  • milestone changed from 8.09.4 Ragnaroek to 8.09.5 Ragnaroek.

Zend doesn't provide has_property class' hook. The one we use is designed for objects only. Solution could be to register all class' properties. We do not do this because it's not mandatory.

04/10/09 18:55:40 changed by piotras

(In [21771]) Declare class properties. Disabled for a while. refs #942

04/20/09 21:50:06 changed by piotras

  • milestone changed from 8.09.5 Ragnaroek to 8.09.6 Ragnaroek.

10/19/09 09:50:33 changed by jval

http://www.php.net/property_exists takes mixed $class and http://www.php.net/get-class-vars takes string $class_name.

Do we want to provide feature which isn't in there by default? I guess if it doesn't affect anything else (doesn't break anything and doesn't make the platform slower) it's ok. And if it does affect something, perhaps then this should be closed as invalid/worksforme.

So the questions are: Is this needed for something? Does having this affect something?

10/20/09 13:00:34 changed by piotras

  • milestone changed from 8.09.6 Ragnaroek to 8.09.7 Ragnaroek.

11/26/09 15:56:56 changed by piotras

  • status changed from new to closed.
  • resolution set to wontfix.

To clarify once again. property_exists() checks if PHP class has property registered. This routine doesn't take into account a case when PHP object uses some underlying data (like GObject). There is underlying has_property hook for self implementations, but it's not taken into account in this case.

I close this ticket. Please re open if it's important.