From 5450a0002c5e263e781075772bb879d396b0e1b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20G=C3=B3recki?= Date: Wed, 16 Feb 2011 12:22:51 +0100 Subject: [PATCH] Fix bug with unsetting non existing array --- EMongoSoftDocument.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/EMongoSoftDocument.php b/EMongoSoftDocument.php index 20520f15..45bf759f 100644 --- a/EMongoSoftDocument.php +++ b/EMongoSoftDocument.php @@ -78,11 +78,7 @@ public function __isset($name) public function __unset($name) { if(array_key_exists($name, $this->softAttributes)) // Use of array_key_exists is mandatory !!! - { unset($this->softAttributes[$name]); - $names = array_flip($this->_attributeNames); - unset($this->_attributeNames[$names[$name]]); - } else parent::__unset($name); }