[symfony-users] Re: sfOutputEscaperObjectDecorator with isset() ?

2010-02-05 Thread Mark Smith
No that does not work either. Even if it did, from the manual: "As opposed with isset(), property_exists() returns TRUE even if the property has the value NULL. " Nulls exceptions / notices are exactly what I am trying to prevent. It's kind of verbose, but the best compromise I have found is to

[symfony-users] Re: sfOutputEscaperObjectDecorator with isset() ?

2010-02-04 Thread ken
make sense since ObjectDecorator does not implement Iterator or ArrayAccess. maybe property_exists can do On Feb 4, 5:09 pm, Mark Smith wrote: > That returns a fatal exception: "Call to undefined method > sfOutputEscaperObjectDecorator::offsetExists()" > > The only static methods I can see on

[symfony-users] Re: sfOutputEscaperObjectDecorator with isset() ?

2010-02-04 Thread Mark Smith
That returns a fatal exception: "Call to undefined method sfOutputEscaperObjectDecorator::offsetExists()" The only static methods I can see on that class are: markClassAsSafe($class) markClassesAsSafe(array $classes) isClassMarkedAsSafe($class) unescape($value) escape($escapingMethod, $value)

[symfony-users] Re: sfOutputEscaperObjectDecorator with isset() ?

2010-02-03 Thread ken
sfOutputEscaperObjectDecorator::offsetExists On Feb 4, 12:38 am, Mark Smith wrote: > Hi, > > In my template I only want to print properties that exist. > > In pure PHP I would use isset: > > echo isset($object->property) ? $object->property : ""; > > However when the object is an sfOutputEscaperO