This is certainly an error in your code, and this is exactly why you should not edit core files as you have here.
You can copy the file you hanged into the local name space from 'core' and then copy the original Magento file back over the core version.
This will allow you to revert easily if you make a mistake.
I would also recommend to get a decent IDE which will show u any coding errors such as missing brackets etc. try something like netbeans or eclipse for excellent warnings when u make simple mistakes