unable to have multiple favourite skins

Bug #1240208 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Critical
Robert Lyon

Bug Description

If you have more than one favourite skin you are not able to choose a skin for a page any more.

[WAR] 92 (lib/errors.php:752) Failed to get a recordset: postgres7 error: [-1: ERROR: invalid input syntax for integer: "2,3"] in EXECUTE("SELECT s.id, s.title, s.owner, s.type
                FROM "skin" s
                WHERE s.id IN (?)
                ORDER BY s.title, s.id")
Command was: SELECT s.id, s.title, s.owner, s.type
                FROM "skin" s
                WHERE s.id IN (?)
                ORDER BY s.title, s.id and values was (2,3)
Call stack (most recent first):

    log_message("Failed to get a recordset: postgres7 error: [-1: E...", 8, true, true) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/errors.php:109
    log_warn("Failed to get a recordset: postgres7 error: [-1: E...") at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/errors.php:752
    SQLException->__construct("Failed to get a recordset: postgres7 error: [-1: E...") at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/dml.php:492
    get_recordset_sql("SELECT s.id, s.title, s.owner, s.type ...", array(size 1), "", "") at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/dml.php:675
    get_records_sql_array("SELECT s.id, s.title, s.owner, s.type ...", array(size 1)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/skin.php:443
    Skin::get_favorite_skins() at /home/robertl/htdocs/mahara-devel/mahara/htdocs/view/skin.php:58

Revision history for this message
Robert Lyon (robertl-9) wrote :
Robert Lyon (robertl-9)
Changed in mahara:
status: Confirmed → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/2612
Committed: http://gitorious.org/mahara/mahara/commit/a640185d7542957161d4d955d960ea1f5146358f
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit a640185d7542957161d4d955d960ea1f5146358f
Author: Robert Lyon <email address hidden>
Date: Wed Oct 16 08:46:56 2013 +1300

Having 2 favourite skins broke add skin to page (bug 1240208)

the db call was complaining about ERROR: invalid input syntax for
integer: "2,3"

so I adjusted the db call to be similar to other WHERE id IN ( )
calls used elsewhere.

Change-Id: I65eb82e659d51cf08ef29d8c37b5bd4b312a2fa1
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Aaron Wells (u-aaronw)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.