From a364cbf5c8f154a04345da9a56b27996fa250c52 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sat, 3 Apr 2010 17:27:27 +1300 Subject: [PATCH] Force ticket_id to be cast to text, even if it looks like a number. --- inc/DAVTicket.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/DAVTicket.php b/inc/DAVTicket.php index 0112fb8f..f40e65f7 100644 --- a/inc/DAVTicket.php +++ b/inc/DAVTicket.php @@ -80,7 +80,7 @@ class DAVTicket 'SELECT access_ticket.*, collection.dav_name, (access_ticket.expires < current_timestamp) AS expired, path_privs(access_ticket.dav_owner_id,collection.dav_name,:scan_depth) AS grantor_collection_privileges FROM access_ticket JOIN collection ON (target_collection_id = collection_id) - WHERE ticket_id = :ticket_id', + WHERE ticket_id = :ticket_id::text', array(':ticket_id' => $ticket_id, ':scan_depth' => $c->permission_scan_depth) ); if ( $qry->Exec('DAVTicket',__LINE__,__FILE__) && $qry->rows() == 1 && $t = $qry->Fetch() ) {