locutusjs / locutus

Bringing stdlibs of other programming languages to JavaScript for educational purposes

Home Page:https://locutus.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP `unserialize` breaking since last minor version

tcandens opened this issue · comments

  • Have you checked the guidelines in our Contributing document?

Description

Looks like recent changes to locutus/php/var/unserialize have caused it to break in the presence of null values.
It is common for null to be serialized as a capital N and recent changes have removed the normalizing toLowerCase when checking the serialized members; n !== N

See this code for illustration of bug:
https://runkit.com/embed/p7h2lhfcf8gf

Thank you for spotting and fixing this issue.