GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — PHP 8.0 debug nts builds fail when unserializing circular array reference such as GLOBALS · Issue #308 · igbinary/igbinary Closed Labels DescriptionThis is a result of the unserialization, not specifically of GLOBALS. The issue is that there are multiple references to the same hash table when unserializing an array when there are multiple references to that array The standard serialize doesn't allow multiple pointers to an array static zend_always_inline zval *_zend_hash_add_or_update_i(HashTable *ht, zend_string *key, zval *pData, uint32_t flag) { zend_ulong h; uint32_t nIndex; uint32_t idx; Bucket *p, *arData; IS_CONSISTENT(ht); HT_ASSERT_RC1(ht); // this fails in debug builds --TEST-- Test serialize globals --SKIPIF-- <?php if (!extension_loaded("igbinary")) print "skip"; ?> --FILE-- <?php call_user_func(function () { foreach ($GLOBALS as $key => $_) { if ($key !== 'GLOBALS') { unset($GLOBALS[$key]); } } $ser = igbinary_serialize($GLOBALS); echo urlencode($ser) . "\n"; var_dump(igbinary_unserialize($ser)); $GLOBALS['globalVar'] = new stdClass(); $ser = igbinary_serialize($GLOBALS); echo urlencode($ser) . "\n"; var_dump(igbinary_unserialize($ser)); }); --EXPECTF-- 0000000214011107474c4f42414c5314010e000101 array(1) { ["GLOBALS"]=> array(1) { ["GLOBALS"]=> *RECURSION* } } TODO fix Activity
MetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |