l3pp4rd/DoctrineExtensions — pull request #228 by jonathaningram (2012-01-11 01:07:43+00:00)
Title: Added exception if an attempt is made to set left or right to a value le...

...ss than 0.

During my development, I've ended up with a corrupt tree where the left and/or right values were negative (e.g. -8!). I believe these are the only places that set the left or right values?

This simply throws an exception if the left/right + delta is less than 0.

I believe the tree should never get in such a state in the first place, but it did somehow, so this should help in the future if an error occurs again.