f9241ff
upstream patch for https://bugs.php.net/66731 (cherry picked from commit 51d586863c50c1bd05a0c79fc638c091ff89c340)