[turba] Tons of PHP ERROR about indexes

LALOT Dominique dom.lalot at gmail.com
Tue Jan 31 12:48:29 UTC 2012


2012/1/31 LALOT Dominique <dom.lalot at gmail.com>

> Hello,
>
> I am trying to get rid of large quantities of such errors, and don't know
> what to do. PHP which was logging such messages as NOTICE is logging as
> ERROR.
> The traces appear with autocompletion (which is working by the way)
> Can we do something to avoid that?
>
> Thanks
>
> Dom
>
> Jan 31 09:06:40 horde41 HORDE: [turba] PHP ERROR: Undefined index: fields
> [pid 13478 on line 102 of "/var/www/horde/turba/lib/Object.php"]
> Jan 31 09:06:40 horde41 HORDE: [turba] PHP ERROR: Invalid argument
> supplied for foreach() [pid 13478 on line 102 of
> "/var/www/horde/turba/lib/Object.php"]
> Jan 31 09:06:40 horde41 HORDE: [turba] PHP ERROR: Undefined index: format
> [pid 13478 on line 105 of "/var/www/horde/turba/lib/Object.php"]
> Jan 31 09:06:40 horde41 HORDE: [turba] PHP ERROR: Undefined index: fields
> [pid 13478 on line 102 of "/var/www/horde/turba/lib/Object.php"]
> Jan 31 09:06:40 horde41 HORDE: [turba] PHP ERROR: Invalid argument
> supplied for foreach() [pid 13478 on line 102 of
> "/var/www/horde/turba/lib/Object.php"]
> Jan 31 09:06:40 horde41 HORDE: [turba] PHP ERROR: Undefined index: format
> [pid 13478 on line 105 of "/var/www/horde/turba/lib/Object.php"]
> Jan 31 09:06:40 horde41 HORDE: [turba] PHP ERROR: Undefined index: fields
> [pid 13478 on line 102 of "/var/www/horde/turba/lib/Object.php"]
> Jan 31 09:06:40 horde41 HORDE: [turba] PHP ERROR: Invalid argument
> supplied for foreach() [pid 13478 on line 102 of
> "/var/www/horde/turba/lib/Object.php"]
> Jan 31 09:06:40 horde41 HORDE: [turba] PHP ERROR: Undefined index: format
> [pid 13478 on line 105 of "/var/www/horde/turba/lib/Object.php"]
>

I've added a test:
            *if (isset($this->driver->map[$attribute]['fields'])){*
              foreach ($this->driver->map[$attribute]['fields'] as $field) {
                $args[] = $this->getValue($field);
              }
              return
Turba::formatCompositeField($this->driver->map[$attribute]['format'],
$args);
            }

I suppose that something could be wrong in turba backends but I have'nt
been able to find the cause.
Trying to trace, that condition is true in getValue:
     if (isset($this->driver->map[$attribute]) &&
            is_array($this->driver->map[$attribute])) {
and the array just contains 'name', without fields or format
I just have a hook for search sources and search fields to avoid searching
*attr* for lots of attributes in our ldap directory.

As that function is called in autocomplete, this is generating lots of php
ERRORS. Don't known why this is no more NOTICE..

Dom

-- 
Dominique LALOT
Ingénieur Systèmes et Réseaux
http://annuaire.univmed.fr/showuser.php?uid=lalot


More information about the turba mailing list