6.0.0-git
2019-03-20

[#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 2014-05-04 (1781 days ago)
Due
Updated 2016-01-27 (1148 days ago)
Assigned 2014-05-06 (1779 days ago)
Resolved 2016-01-27 (1148 days ago)
Milestone
Patch No

History
2016-01-27 17:34:47 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.
2016-01-27 15:59:48 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.
2014-05-06 10:37:05 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.
2014-05-06 10:06:05 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.
2014-05-04 13:15:08 jmozdzen (at) nde (dot) ag Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ turba/lib/Driver/Kolab.php not handling search field arrays
Queue ⇒ Kolab
Milestone ⇒
Patch ⇒ No
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