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
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
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)
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