Преглед изворни кода

Catch errors on destruct of ORM

Nathaniel van Diepen пре 6 година
родитељ
комит
efa4e2a8cc
1 измењених фајлова са 4 додато и 2 уклоњено
  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 @@
 			}
 		}
 	}
-?>
+?>