Skip to content

Commit

Permalink
Fix bug with unsetting non existing array
Browse files Browse the repository at this point in the history
  • Loading branch information
canni committed Feb 16, 2011
1 parent c658dc2 commit 5450a00
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions EMongoSoftDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 5450a00

Please sign in to comment.