|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-04-30 00:12 UTC] felipe@php.net
[2010-06-21 00:31 UTC] felipe@php.net
-Status: Open
+Status: Wont fix
[2010-06-21 00:31 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 16:00:01 2025 UTC |
Description: ------------ I've added a new test into the 6.0 branch called session_encode_variation7.phpt - the expected output for this test shows the problem. It shows that when unicode is enabled the output from session_encode when using the php_binary serialiser is wrong. Reproduce code: --------------- --TEST-- Test session_encode() function : variation --SKIPIF-- <?php include('skipif.inc'); ?> --INI-- session.serialize_handler=php_binary --FILE-- <?php ob_start(); /* * Prototype : string session_encode(void) * Description : Encodes the current session data as a string * Source code : ext/session/session.c */ echo "*** Testing session_encode() : variation ***\n"; var_dump(session_start()); $_SESSION["foo"] = 1234567890; $encoded = session_encode(); var_dump(base64_encode($encoded)); var_dump(session_destroy()); echo "Done"; ob_end_flush(); ?> --EXPECTF-- *** Testing session_encode() : variation *** bool(true) string(24) "A2Zvb2k6MTIzNDU2Nzg5MDs=" bool(true) Done --UEXPECTF-- *** Testing session_encode() : variation *** bool(true) string(0) "" bool(true) Done Expected result: ---------------- --UEXPECTF-- *** Testing session_encode() : variation *** bool(true) unicode(24) "A2Zvb2k6MTIzNDU2Nzg5MDs=" bool(true) Done Actual result: -------------- --UEXPECTF-- *** Testing session_encode() : variation *** bool(true) string(0) "" bool(true) Done