[HttpFoundation] Fix an issue caused by php's Bug #66606.