Bug #1162: serialize misbehaving due to changes in unset
| From: | mark dot edwards at wcom dot co dot uk | Date: | Fri, 19 Feb 1999 14:56:22 +0000 |
| Subject: | Bug #1162: serialize misbehaving due to changes in unset | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-4159@lists.php.net to get a copy of this message | ||
From: mark.edwards@wcom.co.uk
Operating system: Linux RH5.1
PHP version: 3.0.6
PHP Bug Type: Misbehaving function
Bug description: serialize misbehaving due to changes in unset
serialize broken with arrays. Here's a fix. Check 'array_each' and 'unset'
for reasons...
--- /tmp/var.c Fri Feb 19 15:32:47 1999
+++ /usr/local/src/php-3.0.6/functions/var.c Fri Feb 19 15:47:06 1999
@@ -212,6 +212,10 @@
if (_php3_hash_get_current_data(struc->value.ht, (void
**) (&data)) != SUCCESS || !data || (data == struc)) {
continue;
}
+ /* ref: basic_functions.c/array_each() - needed because of
'variables.c/unset()'.*/
+ if (data->type == IS_STRING &&
data->value.str.val==undefined_variable_string) {
+ continue;
+ }
switch (i) {
case HASH_KEY_IS_LONG:
d.type = IS_LONG;
Mark Edwards
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net