Browse Source

Catch errors on destruct of ORM

Nathaniel van Diepen 6 years ago
parent
commit
efa4e2a8cc
1 changed files with 4 additions and 2 deletions
  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 @@
 			}
 		}
 	}
-?>
+?>