Browse Source

Catch errors on destruct of ORM

Nathaniel van Diepen 6 năm trước cách đây
mục cha
commit
efa4e2a8cc
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      orm.abstract.class.php

+ 4 - 2
orm.abstract.class.php

@@ -83,7 +83,9 @@
 			self::$instances[] = $this;
 		}
 		public function __destruct(){
-			$this->__sleep();
+			try{
+				$this->__sleep();
+			}catch(Exception $e){}
 			$this->_changed = [];
 			$this->_data = [];
 			$this->_related = [];
@@ -417,4 +419,4 @@
 			}
 		}
 	}
-?>
+?>