|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-03-13 15:48 UTC] tony2001@php.net
[2006-03-13 16:12 UTC] astur103 at hotmail dot com
[2006-03-13 16:24 UTC] astur103 at hotmail dot com
[2006-03-15 17:39 UTC] astur103 at hotmail dot com
[2006-03-19 18:01 UTC] mike@php.net
[2006-03-27 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 16:00:01 2025 UTC |
Description: ------------ Sometimes, above all if memory is clean or the function is not loaded in memory and has to do it, chunk_split cut a base64 string wrongly. Later, works fine. Reproduce code: --------------- This is the used function: function compress_gz($string, $level = "1") { $final_string = ""; IF(!empty($string)) { $final_string = chunk_split(base64_encode(gzcompress($string, $level))); } return $final_string; unset($string); unset($final_string); } Expected result: ---------------- I guess that something like this ... ---- LAST 3 LINES OF STRING --- 0r5uCiYhgApgyg3dCkwmwrauUwVphDguNk2YXJFHqWtjYBAbJjL9iS4X14tgmvRNyD6ef+L3Ve3y 5eLawo1+GJjEDVylt2st73hav2fuh90XV7iJbHVZexbnfz9M2d8Yszv8AKlPYUQ== ---- END ---- Actual result: -------------- ---- LAST 3 LINES OF STRING --- 0r5uCiYhgApgyg3dCkwmwrauUwVphDguNk2YXJFHqWtjYBAbJjL9iS4X14tgmvRNyD6ef+L3Ve3y 5eLawo1+GJjEDVylt2st73hav2fuh90XV7iJbHVZexbnfz9M2d8= Yszv8AKlPYUQ== ---- END ----