Fix tests broken by bad reference placement

This commit is contained in:
Timothy Warren 2012-03-05 13:02:39 -05:00
parent 6483578772
commit 7859c6ff2d
4 changed files with 12 additions and 12 deletions

View File

@ -89,7 +89,7 @@ abstract class DB_PDO extends PDO {
*/ */
public function prepare_execute($sql, $params) public function prepare_execute($sql, $params)
{ {
$this->statement =& $this->prepare_query($sql, $params); $this->statement = $this->prepare_query($sql, $params);
$this->statement->execute(); $this->statement->execute();
return $this->statement; return $this->statement;

View File

@ -30,7 +30,7 @@ class firebird extends DB_PDO {
*/ */
public function __construct($dbpath, $user='sysdba', $pass='masterkey') public function __construct($dbpath, $user='sysdba', $pass='masterkey')
{ {
$this->conn =& ibase_connect($dbpath, $user, $pass, 'utf-8'); $this->conn = ibase_connect($dbpath, $user, $pass, 'utf-8');
$class = __CLASS__."_sql"; $class = __CLASS__."_sql";
$this->sql = new $class; $this->sql = new $class;
@ -73,7 +73,7 @@ class firebird extends DB_PDO {
public function query($sql) public function query($sql)
{ {
$this->count = 0; $this->count = 0;
$this->statement =& ibase_query($this->conn, $sql); $this->statement = ibase_query($this->conn, $sql);
return $this->statement; return $this->statement;
} }
@ -98,7 +98,7 @@ class firebird extends DB_PDO {
break; break;
default: default:
return ibase_fetch_assoc(&$this->statement, IBASE_FETCH_BLOBS); return ibase_fetch_assoc($this->statement, IBASE_FETCH_BLOBS);
break; break;
} }
} }
@ -133,9 +133,9 @@ class firebird extends DB_PDO {
* @param string $query * @param string $query
* @return $this * @return $this
*/ */
public function prepare($query) public function prepare($query, $options=NULL)
{ {
$this->statement =& ibase_prepare($this->conn, $query); $this->statement = ibase_prepare($this->conn, $query);
return $this->statement; return $this->statement;
} }
@ -154,7 +154,7 @@ class firebird extends DB_PDO {
AND "RDB\$RELATION_NAME" NOT LIKE 'MON$%' AND "RDB\$RELATION_NAME" NOT LIKE 'MON$%'
SQL; SQL;
$this->statement =& $this->query($sql); $this->statement = $this->query($sql);
$tables = array(); $tables = array();
@ -181,7 +181,7 @@ SQL;
OR "RDB\$RELATION_NAME" LIKE 'MON$%'; OR "RDB\$RELATION_NAME" LIKE 'MON$%';
SQL; SQL;
$this->statement =& $this->query($sql); $this->statement = $this->query($sql);
$tables = array(); $tables = array();
@ -200,7 +200,7 @@ SQL;
* *
* @return int * @return int
*/ */
public function affected_rows() public function affected_rows($statement="")
{ {
return ibase_affected_rows($this->conn); return ibase_affected_rows($this->conn);
} }
@ -221,7 +221,7 @@ SQL;
} }
//Fetch all the rows for the result //Fetch all the rows for the result
$this->result =& $this->fetchAll(); $this->result = $this->fetchAll();
return count($this->result); return count($this->result);
} }
@ -312,7 +312,7 @@ SQL;
* @param string $str * @param string $str
* @return string * @return string
*/ */
public function quote($str) public function quote($str, $param_type=NULL)
{ {
if(is_numeric($str)) if(is_numeric($str))
{ {

View File

@ -71,7 +71,7 @@ class SQLiteTest extends UnitTestCase {
INSERT INTO "create_test" ("id", "key", "val") INSERT INTO "create_test" ("id", "key", "val")
VALUES (?,?,?) VALUES (?,?,?)
SQL; SQL;
$statement =& $this->db->prepare_query($sql, array(1,"boogers", "Gross")); $statement = $this->db->prepare_query($sql, array(1,"boogers", "Gross"));
$statement->execute(); $statement->execute();

Binary file not shown.