#34504 [Opn->Bgs]: unserialize return is different

From: Date: Wed, 14 Sep 2005 23:42:31 +0000
Subject: #34504 [Opn->Bgs]: unserialize return is different
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-85062@lists.php.net to get a copy of this message
ID: 34504 Updated by: tony2001@php.net Reported By: wkonkel at gmail dot com -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: redhat PHP Version: 5.0.5 New Comment: Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. Please search bug db before submitting new reports. Previous Comments: ------------------------------------------------------------------------ [2005-09-15 00:45:31] wkonkel at gmail dot com Description: ------------ In php 5.0.4 and prior, this code snippet worked. In php 5.0.5, it now returns an error. A work around is to change the code to: $obj = unserialize($data); echo array_pop($obj); Reproduce code: --------------- <? $data = serialize(array('test', 'test2')); echo array_pop(unserialize($data)); ?> Expected result: ---------------- test2 Actual result: -------------- Fatal error: Only variables can be passed by reference in /var/www/bountysource/public/test.php on line 4 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34504&edit=1

« previous php.bugs (#85062) next »