Skip to content

Commit

Permalink
Merge pull request #19 from zobzn/master
Browse files Browse the repository at this point in the history
fix breaking changes after #16 pull request (derflocki:fix-ORA-01000)
  • Loading branch information
j0k3r committed May 31, 2016
2 parents 8204141 + 40c0d16 commit fccdf97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Doctrine/Connection/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,11 @@ public function execute($params = null)
$this->_conn->getListener()->postStmtExecute($event);

//fix a possible "ORA-01000: maximum open cursors exceeded" when many non-SELECTs are executed and the profiling is enabled
if (strtoupper(substr($this->_stmt->queryString,0,6)) != 'SELECT' && strtoupper(substr($this->_stmt->queryString,0,4)) != 'WITH' ){
$queryBeginningSubstring = strtoupper(substr(ltrim($this->_stmt->queryString), 0, 6));
if ($queryBeginningSubstring != 'SELECT' && substr($queryBeginningSubstring, 0, 4) != 'WITH' ){
$this->closeCursor();
}

return $result;
} catch (PDOException $e) {
} catch (Doctrine_Adapter_Exception $e) {
Expand Down

0 comments on commit fccdf97

Please sign in to comment.