Fix a lot of error when error_reporting(E_ALL) is ON.