This issue is a sub-set of issues under CVE-2015-8835 (bug 1323074). It seems the fix for that issue was not properly applied to PHP 7, hence the issue was re-reported there, but was already fixed in PHP 5 versions at the time.
See bug 1323074 comment 1 for more info on the original issue.
*** This bug has been marked as a duplicate of bug 1323074 ***