Public bug reported: The call to get_group_user_search_results() in searchlib.php has the potential to throw errors.
There are calls to methods in the current search class. The first is a call to 'can_process_raw_group_search_user_queries()' which returns a boolean. If true, $queries is set to $query, which is a string. If false, $queries is built as an array. After that, 'group_search_user()' is called on the search class. Currently this passes the request on to 'PluginSearchInternal::group_search_user()' Here, the $queries is named $query_string. Tracking this variable through it is ultimately treated as a string and would through a "trim() expects parameter 1 to be string, array given" warning. As far as I can see this would never happen though. Either we can remove this *or* we should process the $queries array down to a string before passing it on. For context, this was found while writing a search plugin. ** Affects: mahara Importance: Low Status: New -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: mahara-contributors https://bugs.launchpad.net/bugs/1943089 Title: Potential error in get_group_user_search_results() Status in Mahara: New Bug description: The call to get_group_user_search_results() in searchlib.php has the potential to throw errors. There are calls to methods in the current search class. The first is a call to 'can_process_raw_group_search_user_queries()' which returns a boolean. If true, $queries is set to $query, which is a string. If false, $queries is built as an array. After that, 'group_search_user()' is called on the search class. Currently this passes the request on to 'PluginSearchInternal::group_search_user()' Here, the $queries is named $query_string. Tracking this variable through it is ultimately treated as a string and would through a "trim() expects parameter 1 to be string, array given" warning. As far as I can see this would never happen though. Either we can remove this *or* we should process the $queries array down to a string before passing it on. For context, this was found while writing a search plugin. To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1943089/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp