[Tickets #11124] Re: decode_attribute hook an exceptions

bugs at horde.org bugs at horde.org
Tue Apr 3 12:23:29 UTC 2012


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/11124
------------------------------------------------------------------------------
  Ticket             | 11124
  Updated By         | Jan Schneider <jan at horde.org>
  Summary            | decode_attribute hook an exceptions
  Queue              | Turba
  Version            | 3.0.12
  Type               | Enhancement
  State              | Feedback
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


Jan Schneider <jan at horde.org> (2012-04-03 14:23) wrote:

>>> To get  the pictures in 'localsql' back, i have to throw an exception
>>> instead of the
>>> default passthrough 'return $value'.
>>
>> Yes, because that's how we detect if an attribute was *not* processed
>> by a hook, and thus continue the further processing of composite and
>> image fields further down in getValue(). If you moved the hook
>> calling further down, you wouldn't be able to hook into those fields
>> at all.
>>
>>> Now it works as expected, but i have tons of "No decode handler"
>>> errors in the Logs.
>>> What I'm doing wrong here?
>>
>> Nothing, though I admit that having the logs spammed with false
>> warnings isn't optimal.
>
> Just a few thoughts:
>
> - to detect, whether or not an attribute has processed, one could
> compare the value before and after the hook

Not easily possible, because the values aren't necessarily scalar values.

> - is it really desired, to have composite fields processed by the hook?
> They are a combination of  driver values (that should be processed)

This is debatable, but I don't see a reason to artificially limit  
which fields we allow to pass through the hook, just for code-flow  
reasons.

> - are images in this sense not some special kind of composite fields?

Not really.





More information about the bugs mailing list