Details
Description
Database component which is on sqlabstraction folder ( query.php ) has a serious bug. Private properties of boundValues and boundParameters give an irk problem. they persisted ! somehow, reset method on inherited class cannot fully reset this variables.
My quick fix is, just set those properties to protected attribute, and case closed
ADDED:
I attached my failed test if those properties still in private attribute. ( I am using Simpletest on this case ). My test failed on QuerySelectImpl on testingBindInteger section with some value on previous test - testingBindString - carried with, even if I'd already reset it.
this is the simpletest code:
{{{
...
function testingBindString()
function testingBindInteger()
{ $expected = 7; $num = 0; $q = $this->q; $e = $this->e; $q->select( 'COUNT(*)' ) ->from( 'query_test' ) ->where( $e->gt( 'employees', $q->bindParam( $num ) ) ); $statement = $q->prepare(); $statement->execute(); $this->assertEqual( $expected, (int) $statement->fetchColumn(0) ); $expected = 3; $num = 100; $statement = $q->prepare(); $statement->execute(); $this->assertEqual( $expected, (int) $statement->fetchColumn(0) ); }...
}}}