fix PHP errors