Quellcode durchsuchen

Fix for #99 - Zend_Db: Abstract adapter sets its connection to false instead of null on sleep

Frank vor 12 Jahren
Ursprung
Commit
16afad5e7b
1 geänderte Dateien mit 8 neuen und 3 gelöschten Zeilen
  1. 8 3
      library/Zend/Db/Adapter/Abstract.php

+ 8 - 3
library/Zend/Db/Adapter/Abstract.php

@@ -1127,10 +1127,15 @@ abstract class Zend_Db_Adapter_Abstract
         if ($this->_allowSerialization == false) {
             /** @see Zend_Db_Adapter_Exception */
             require_once 'Zend/Db/Adapter/Exception.php';
-            throw new Zend_Db_Adapter_Exception(get_class($this) ." is not allowed to be serialized");
+            throw new Zend_Db_Adapter_Exception(
+                get_class($this) . ' is not allowed to be serialized'
+            );
         }
-        $this->_connection = false;
-        return array_keys(array_diff_key(get_object_vars($this), array('_connection'=>false)));
+        $this->_connection = null;
+
+        return array_keys(
+            array_diff_key(get_object_vars($this), array('_connection' => null))
+        );
     }
 
     /**