[PHP-DEV] Re: object_properties_load() does not work for non-string keys -intentional?

2015-09-06 Thread Andrea Faulds
Hey Stas, Stanislav Malyshev wrote: Working on unserialize edge case patches backporting, I've discovered that object_properties_load() function crashes if the properties array contains non-string keys (which can happen on unserialize). Now, I can fix the crash, but I can fix it in two ways:

[PHP-DEV] Re: object_properties_load() does not work for non-string keys - intentional?

2015-09-02 Thread Dmitry Stogov
Hi Stas, I don't see the crash. Integer keys are supported in exactly the same way as it was in PHP-5. $ sapi/cli/php -r '$a = [1=>5]; $o = (object)$a; var_dump($o); $s = serialize($o); var_dump($s);var_dump(unserialize($s));' object(stdClass)#1 (1) { [1]=> int(5) } string(27)

[PHP-DEV] Re: object_properties_load() does not work for non-string keys - intentional?

2015-09-02 Thread Stanislav Malyshev
Hi! > I don't see the crash. Integer keys are supported in exactly the same > way as it was in PHP-5. I see the crash on this test: https://github.com/smalyshev/php-src/blob/master/ext/spl/tests/bug70155.phpt I'm not sure how integer keys are supported the same way if I see this in the code: