unserialize
doesn't respect class_alias
for properties
#18542
Labels
unserialize
doesn't respect class_alias
for properties
#18542
Description
The following code:
Resulted in this output:
But I expected this output instead:
If I look at the
serialized.bin
file, I can see that for the variable "answer", there is{s:13:"�Hello�answer";i:42;}
stored (containing the class without alias).When I add debug for
__unserialize
I will get this output. The
Helloanswer
is actually\0Hello\0answer
Using this naiive fix will work, but is really ugly:
PHP Version
Operating System
No response
The text was updated successfully, but these errors were encountered: