ソースを参照

Added condition to check Log class existence

Tadahisa MOTOOKA 8 年 前
コミット
0de4e2ab83
1 ファイル変更1 行追加1 行削除
  1. 1 1
      src/Database/Connection.php

+ 1 - 1
src/Database/Connection.php

@@ -128,7 +128,7 @@ class Connection implements ConnectionInterface
      */
     public function __destruct()
     {
-        if ($this->_transactionStarted) {
+        if ($this->_transactionStarted && class_exists('Cake\Log\Log')) {
             Log::warning('The connection is going to be closed but the transaction is still active.');
         }
         unset($this->_driver);