Commit f62897b8 authored by gnat's avatar gnat

While updating sfDoctrine, stumbled across these errors....

While updating sfDoctrine, stumbled across these errors. this->_stmt->queryString is a protected field and should be access from getQuery() instead.
parent 643650f7
...@@ -73,7 +73,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf ...@@ -73,7 +73,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf
} }
public function getQuery() public function getQuery()
{ {
return $this->_stmt->queryString; return $this->_stmt->getQuery();
} }
/** /**
* bindColumn * bindColumn
...@@ -213,7 +213,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf ...@@ -213,7 +213,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf
*/ */
public function execute($params = null) 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) . "<br>"; // print $this->_stmt->queryString . print_r($params, true) . "<br>";
$skip = $this->_conn->getListener()->onPreExecute($event); $skip = $this->_conn->getListener()->onPreExecute($event);
...@@ -257,7 +257,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf ...@@ -257,7 +257,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf
$cursorOrientation = Doctrine::FETCH_ORI_NEXT, $cursorOrientation = Doctrine::FETCH_ORI_NEXT,
$cursorOffset = null) $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)); array($fetchStyle, $cursorOrientation, $cursorOffset));
$data = $this->_conn->getListener()->onPreFetch($event); $data = $this->_conn->getListener()->onPreFetch($event);
...@@ -284,7 +284,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf ...@@ -284,7 +284,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf
public function fetchAll($fetchStyle = Doctrine::FETCH_BOTH, public function fetchAll($fetchStyle = Doctrine::FETCH_BOTH,
$columnIndex = null) $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); $data = $this->_conn->getListener()->onPreFetchAll($event);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment