Browse Source

Merge pull request #11046 from cakephp/bugfix/connection

Make internal driver usage consistent.
Mark Story 8 years ago
parent
commit
23a111edce
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/Database/Connection.php
  2. 1 1
      src/Database/Query.php

+ 1 - 1
src/Database/Connection.php

@@ -833,7 +833,7 @@ class Connection implements ConnectionInterface
      */
     protected function _newLogger(StatementInterface $statement)
     {
-        $log = new LoggingStatement($statement, $this->getDriver());
+        $log = new LoggingStatement($statement, $this->_driver);
         $log->logger($this->logger());
 
         return $log;

+ 1 - 1
src/Database/Query.php

@@ -211,10 +211,10 @@ class Query implements ExpressionInterface, IteratorAggregate
     public function execute()
     {
         $statement = $this->_connection->run($this);
-        $driver = $this->_connection->driver();
         $typeMap = $this->getSelectTypeMap();
 
         if ($typeMap->toArray() && $this->_typeCastAttached === false) {
+            $driver = $this->_connection->getDriver();
             $this->decorateResults(new FieldTypeConverter($typeMap, $driver));
             $this->_typeCastAttached = true;
         }