6.0.0-beta1
7/5/25

[#13161] turba/lib/Driver/Kolab.php not handling search field arrays
Summary turba/lib/Driver/Kolab.php not handling search field arrays
Queue Kolab
Type Bug
State Not Reproducible
Priority 1. Low
Owners
Requester jmozdzen (at) nde (dot) ag
Created 05/04/2014 (4080 days ago)
Due
Updated 01/27/2016 (3447 days ago)
Assigned 05/06/2014 (4078 days ago)
Resolved 01/27/2016 (3447 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
01/27/2016 05:34:47 PM jmozdzen (at) nde (dot) ag Comment #5 Reply to this comment
Doesn't happen for me, whether a contact has categories or not. May 
be fixed in the meantime.
given that I don't see my work-around in the source, and neither do I 
see the error messages, it's rather likely this was fixed somewhere 
along the various updates to Horde since.

Case closed.
01/27/2016 03:59:48 PM Jan Schneider Comment #4
State ⇒ Not Reproducible
Reply to this comment
Doesn't happen for me, whether a contact has categories or not. May be 
fixed in the meantime.
05/06/2014 10:37:05 AM jmozdzen (at) nde (dot) ag Comment #3 Reply to this comment
What *is* the first parameter to stripos() there? I assume you 
already logged, because you used Horde::debug(), but you left out 
the value.
Sorry, this appeared in the context of another bug, I had focussed there ;)

The problem happened in our case when the code accessed the 
"categories" field - that's an array (as the name already implies).

As an interim (to get rid of the messages, so that I could continue 
debugging the other case) I encapsulated thae code in " if 
(is_array(...))", which of course is no solution as then no 
multi-valued field is searched.

I'm off-site without back-end access - if the above is insufficient 
information (it's all from memory), please let me know and I'll try to 
gather the bits tonight.
05/06/2014 10:06:05 AM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
What *is* the first parameter to stripos() there? I assume you already 
logged, because you used Horde::debug(), but you left out the value.
05/04/2014 01:15:08 PM jmozdzen (at) nde (dot) ag Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ turba/lib/Driver/Kolab.php not handling search field arrays
Queue ⇒ Kolab
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
Something that does catch the eye are hundreds of messages

--- cut here ---
2014-05-04T14:22:53+02:00 WARN: HORDE [turba] PHP ERROR: stripos() 
expects parameter 1 to be string, array given [pid 5743 on line 536 of 
"/srv/www/htdocs.www.nde.ag.ssl/horde/turba/lib/Driver/Kolab.php"]
--- cut here ---
in Horde's log file. These messages are created while the search Ajax 
call is executed, but only for those calles before the settings were 
saved... when the search doesn't work, I see these messages. I have 
collected the according backtrace:

--- cut here ---
Backtrace:
  1. Horde_Core_Ajax_Application->doAction() 
/srv/www/htdocs.www.nde.ag.ssl/horde/services/ajax.php:57
  2. call_user_func() /usr/share/php5/PEAR/Horde/Core/Ajax/Application.php:171
  3. Horde_Core_Ajax_Application_Handler_Imple->imple()
  4. Horde_Core_Ajax_Imple->handle() 
/usr/share/php5/PEAR/Horde/Core/Ajax/Application/Handler/Imple.php:31
  5. Horde_Core_Ajax_Imple_AutoCompleter->_handle() 
/usr/share/php5/PEAR/Horde/Core/Ajax/Imple.php:120
  6. 
Horde_Core_Ajax_Imple_ContactAutoCompleter->_handleAutoCompleter() 
/usr/share/php5/PEAR/Horde/Core/Ajax/Imple/AutoCompleter.php:59
  7. Horde_Core_Ajax_Imple_ContactAutoCompleter->getAddressList() 
/usr/share/php5/PEAR/Horde/Core/Ajax/Imple/ContactAutoCompleter.php:46
  8. Horde_Registry->call() 
/usr/share/php5/PEAR/Horde/Core/Ajax/Imple/ContactAutoCompleter.php:71
  9. Horde_Registry->callByPackage() 
/usr/share/php5/PEAR/Horde/Registry.php:1105
10. call_user_func_array() /usr/share/php5/PEAR/Horde/Registry.php:1148
11. Turba_Api->search()
12. Turba_Driver->search() 
/srv/www/htdocs.www.nde.ag.ssl/horde/turba/lib/Api.php:1180
13. Turba_Driver_Share->_search() 
/srv/www/htdocs.www.nde.ag.ssl/horde/turba/lib/Driver.php:610
14. Turba_Driver_Kolab->_search() 
/srv/www/htdocs.www.nde.ag.ssl/horde/turba/lib/Driver/Share.php:212
15. Turba_Driver_Kolab->_doSearch() 
/srv/www/htdocs.www.nde.ag.ssl/horde/turba/lib/Driver/Kolab.php:429
16. Turba_Driver_Kolab->_selectEntries() 
/srv/www/htdocs.www.nde.ag.ssl/horde/turba/lib/Driver/Kolab.php:472
17. Horde::debug() 
/srv/www/htdocs.www.nde.ag.ssl/horde/turba/lib/Driver/Kolab.php:533
--- cut here ---

Might it be that that Kolab driver wasn't modified to follow a 
previous change in some Turba data type?

Saved Queries