Restructure your code (yes, even more!) so it is easier to see such a mistake.
Some coders prefer this:
if () { code }
but i prefer if () { code } so i see immediately what {braces} belong together.
With nested braces I nest each brace set one tab deeper.
Start with the case "new": part as i removed some of your if & brace-sets within that condition and then i saw it had some closing braces left within the case:, and that is a _sin_.
Chris PS Do you have a colorcoding editor?
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php