From f62897b873450148740b56332fab8455d97711b6 Mon Sep 17 00:00:00 2001 From: gnat Date: Thu, 21 Jun 2007 16:37:27 +0000 Subject: [PATCH] While updating sfDoctrine, stumbled across these errors. this->_stmt->queryString is a protected field and should be access from getQuery() instead. --- lib/Doctrine/Connection/Statement.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/Connection/Statement.php b/lib/Doctrine/Connection/Statement.php index b60e711e2..b8fa1d439 100644 --- a/lib/Doctrine/Connection/Statement.php +++ b/lib/Doctrine/Connection/Statement.php @@ -73,7 +73,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf } public function getQuery() { - return $this->_stmt->queryString; + return $this->_stmt->getQuery(); } /** * bindColumn @@ -213,7 +213,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf */ public function execute($params = null) { - $event = new Doctrine_Event($this, Doctrine_Event::EXECUTE, $this->_stmt->queryString, $params); + $event = new Doctrine_Event($this, Doctrine_Event::EXECUTE, $this->_stmt->getQuery(), $params); // print $this->_stmt->queryString . print_r($params, true) . "
"; $skip = $this->_conn->getListener()->onPreExecute($event); @@ -257,7 +257,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf $cursorOrientation = Doctrine::FETCH_ORI_NEXT, $cursorOffset = null) { - $event = new Doctrine_Db_Event($this, Doctrine_Db_Event::FETCHALL, $this->_stmt->queryString, + $event = new Doctrine_Db_Event($this, Doctrine_Db_Event::FETCHALL, $this->_stmt->getQuery(), array($fetchStyle, $cursorOrientation, $cursorOffset)); $data = $this->_conn->getListener()->onPreFetch($event); @@ -284,7 +284,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf public function fetchAll($fetchStyle = Doctrine::FETCH_BOTH, $columnIndex = null) { - $event = new Doctrine_Db_Event($this, Doctrine_Db_Event::FETCHALL, $this->_stmt->queryString, array($fetchStyle, $columnIndex)); + $event = new Doctrine_Db_Event($this, Doctrine_Db_Event::FETCHALL, $this->_stmt->getQuery(), array($fetchStyle, $columnIndex)); $data = $this->_conn->getListener()->onPreFetchAll($event);