Bug #75289 [Nab]: Unserialize ArrayIterator incompatible between php 5.6 and 7.1

From: Date: Fri, 29 Sep 2017 21:45:22 +0000
Subject: Bug #75289 [Nab]: Unserialize ArrayIterator incompatible between php 5.6 and 7.1
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211469@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75289&edit=1 ID: 75289 User updated by: sp at feig-partner dot de Reported by: sp at feig-partner dot de -Summary: Unserialize ArrayIterator broken +Summary: Unserialize ArrayIterator incompatible between php 5.6 and 7.1 Status: Not a bug Type: Bug Package: SPL related Operating System: irrelevant PHP Version: 7.1.10 Block user comment: N Private report: N New Comment: You're right, sorry. My debugging was flawed. I have fixed my data and rerun my tests. There is still one little Problem. Serializing with php 5.6 and unserializing with php 7.1.10 still produces "Fatal error: Uncaught UnexpectedValueException: Error at offset 13 of 26 bytes" https://3v4l.org/ehJiR I don't know if fixing that is worth the trouble, though. Previous Comments: ------------------------------------------------------------------------ [2017-09-29 19:50:20] nikic@php.net serialize() output is binary data, and your method of copying the strings stripped the null bytes. Trying the same after an application of bin2hex and hex2bin worked for me. ------------------------------------------------------------------------ [2017-09-29 19:34:42] sp at feig-partner dot de Description: ------------ This is a followup to this bug: https://bugs.php.net/bug.php?id=74669 While serialization and unserialization in the same run now works: https://3v4l.org/6c4RU it still fails, when you're serializing in one run and unserializing in another. Take the serialized output from here: https://3v4l.org/bNCbY#v560 and unserialize it separately: https://3v4l.org/EcAWQ Gives "Notice: unserialize(): Error at offset 45 of 193 bytes in /in/EcAWQ on line 47" With the serialized output from php5 the result is the same: https://3v4l.org/v5D2l ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75289&edit=1

« previous php.bugs (#211469) next »