|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-01-07 16:48 UTC] michal at cihar dot com
Description: ------------ Unserializing of numbers > MAX_INT is wrong. That's because php uses long internally for storing ints but int is used in unserializing. Attached patch fixes this issue. Reproduce code: --------------- <?php echo unserialize(serialize(2147483648)); ?> Expected result: ---------------- 2147483648 Actual result: -------------- -2147483648 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 06:00:01 2025 UTC |
I haven't yet find time to test this, but you seem to duplicate part of code with this commit: if (elements < 0) { return 0; } + if (elements < 0) { + return 0; + } +