Reviewed: https://reviews.mahara.org/5214 Committed: https://git.nzoss.org.nz/mahara/mahara/commit/7ea48590d6ecb74e244a1193fa86d35f3bef94b3 Submitter: Robert Lyon (robe...@catalyst.net.nz) Branch: master
commit 7ea48590d6ecb74e244a1193fa86d35f3bef94b3 Author: Robert Lyon <robe...@catalyst.net.nz> Date: Fri Sep 4 12:51:48 2015 +1200 Bug 1486766: Dealing with array of usernames with webservice search The select2 username picker returns an array of user ids but the log search can only handle one user so we only want the first of the array behatnotneeded Change-Id: I9efd12d73ecfb640e7a96332538aaa1f27d0176e Signed-off-by: Robert Lyon <robe...@catalyst.net.nz> -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1486766 Title: Error message when searching for users in web services logs Status in Mahara: Fix Committed Bug description: master 15.10dev When you search for a user on /webservice/admin/webservicelogs.php and click the "Go" button, you get the following error messages: [WAR] d7 (lib/dml.php:1578) Array to string conversion Call stack (most recent first): log_message("Array to string conversion", 8, true, true, "/home/kristina/code/mahara/htdocs/lib/dml.php", 1578) at /home/kristina/code/mahara/htdocs/lib/errors.php:441 error(8, "Array to string conversion", "/home/kristina/code/mahara/htdocs/lib/dml.php", 1578, array(size 4)) at Unknown:0 implode(",", array(size 1)) at /home/kristina/code/mahara/htdocs/lib/dml.php:1578 create_sql_exception_message(object(ADODB_Exception), "SELECT "username" FROM "usr" WHERE "id" = ? ", array(size 1)) at /home/kristina/code/mahara/htdocs/lib/dml.php:480 get_recordset_sql("SELECT "username" FROM "usr" WHERE "id" = ? ", array(size 1)) at /home/kristina/code/mahara/htdocs/lib/dml.php:791 get_field_sql("SELECT "username" FROM "usr" WHERE "id" = ? ", array(size 1)) at /home/kristina/code/mahara/htdocs/lib/dml.php:779 get_field("usr", "username", "id", array(size 1)) at /home/kristina/code/mahara/htdocs/webservice/admin/webservicelogs.php:22 [WAR] d7 (lib/errors.php:747) Failed to get a recordset: postgres8 error: [-1: ERROR: invalid input syntax for integer: "Array"] in EXECUTE("SELECT "username" FROM "usr" WHERE "id" = ? ") Command was: SELECT "username" FROM "usr" WHERE "id" = ? and values was (Array) Call stack (most recent first): log_message("Failed to get a recordset: postgres8 error: [-1: E...", 8, true, true) at /home/kristina/code/mahara/htdocs/lib/errors.php:97 log_warn("Failed to get a recordset: postgres8 error: [-1: E...") at /home/kristina/code/mahara/htdocs/lib/errors.php:747 SQLException->__construct("Failed to get a recordset: postgres8 error: [-1: E...") at /home/kristina/code/mahara/htdocs/lib/dml.php:480 get_recordset_sql("SELECT "username" FROM "usr" WHERE "id" = ? ", array(size 1)) at /home/kristina/code/mahara/htdocs/lib/dml.php:791 get_field_sql("SELECT "username" FROM "usr" WHERE "id" = ? ", array(size 1)) at /home/kristina/code/mahara/htdocs/lib/dml.php:779 get_field("usr", "username", "id", array(size 1)) at /home/kristina/code/mahara/htdocs/webservice/admin/webservicelogs.php:22 [WAR] d7 (lib/dml.php:480) Failed to get a recordset: postgres8 error: [-1: ERROR: invalid input syntax for integer: "Array"] in EXECUTE("SELECT "username" FROM "usr" WHERE "id" = ? ") Command was: SELECT "username" FROM "usr" WHERE "id" = ? and values was (Array) Call stack (most recent first): get_recordset_sql("SELECT "username" FROM "usr" WHERE "id" = ? ", array(size 1)) at /home/kristina/code/mahara/htdocs/lib/dml.php:791 get_field_sql("SELECT "username" FROM "usr" WHERE "id" = ? ", array(size 1)) at /home/kristina/code/mahara/htdocs/lib/dml.php:779 get_field("usr", "username", "id", array(size 1)) at /home/kristina/code/mahara/htdocs/webservice/admin/webservicelogs.php:22 To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1486766/+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