#1361: AgaviPdoSessionStorage throws: Exception thrown without a stack frame in
Unknown on line 0
------------------------------------------+---------------------------------
 Reporter:  jeramy@…                      |       Owner:  david
     Type:  defect                        |      Status:  new  
 Priority:  high                          |   Milestone:  1.0.5
Component:  storage                       |     Version:  1.0.4
 Severity:  major                         |    Keywords:       
Has_patch:  0                             |  
------------------------------------------+---------------------------------
 If an SQL update doesn't occur on the sessionWrite() method (due to no
 data actually being adjudted), the test on line 387 returns a falsely
 value which then attempts to insert a new row into the database.

 This line assumes that its checking if a specific row exists in the table,
 where as the statement actually checks if any rows where affected by the
 query, which in our case none have, so a insertion is attempted.  This
 results in an exception relating to 'SQLSTATE[23000]: Integrity constraint
 violation: 1062 Duplicate entry'.

 I've submitted a patch which performs a select query to see if the row
 exists.

-- 
Ticket URL: <http://trac.agavi.org/ticket/1361>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5



_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets

Reply via email to