More PHP error fixes