#18662 [NEW]: unserialize returns false if some element is empty

From: Date: Wed, 31 Jul 2002 10:30:38 +0000
Subject: #18662 [NEW]: unserialize returns false if some element is empty
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-15656@lists.php.net to get a copy of this message
From: to@andybutkaj.com Operating system: Windows 2000 and Windows XP PHP version: 4.2.2 PHP Bug Type: Strings related Bug description: unserialize returns false if some element is empty I try unserialize array and everything goes nice when the array has all elements filled. When one of element is empty unserialize returns false More specific: PHP 4.0.6 """"""""" a:1:{s:12:"fas";a:6:{s:10:"mkey_index";s:12:"fas";s:9:"save_type";i:1;s:6:"German";i:;s:7:"English";i:;s:6:"Slovak";i:;s:5:"Czech";i:;}} unserialize returns array where empty elements are replaced by 0 ___________________________________________________________ PHP 4.2.2 """"""""" a:1:{s:12:"fas";a:6:{s:10:"mkey_index";s:12:"fas";s:9:"save_type";i:1;s:6:"German";i:;s:7:"English";i:;s:6:"Slovak";i:;s:5:"Czech";i:;}} unserialize returns false (if no empty elements, unserialize returns correct array) -- Edit bug report at http://bugs.php.net/?id=18662&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18662&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18662&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18662&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18662&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18662&r=support Expected behavior: http://bugs.php.net/fix.php?id=18662&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18662&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18662&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18662&r=globals

« previous php.bugs (#15656) next »