Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:1915 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85304 invoked from network); 22 May 2003 22:20:21 -0000 Received: from unknown (HELO moutng.kundenserver.de) (212.227.126.188) by pb1.pair.com with SMTP; 22 May 2003 22:20:21 -0000 Received: from [212.227.126.206] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 19IyQ7-00074s-00; Fri, 23 May 2003 00:20:19 +0200 Received: from [217.80.180.225] (helo=[217.80.180.225]) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 19IyQ6-0002W4-00; Fri, 23 May 2003 00:20:19 +0200 To: Dmitriy Myshkin Cc: internals@lists.php.net In-Reply-To: <1053639840.53293.14.camel@localhost> References: <200305211946.h4LJkAj04428@webp5.t3link.com> <1053639840.53293.14.camel@localhost> Content-Type: multipart/mixed; boundary="=-pbPhfAmVrOOTToLc/Wzs" Organization: Message-ID: <1053642025.53293.17.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 23 May 2003 00:20:26 +0200 Subject: Re: [PHP-DEV] severe serialize problem From: thekid@thekid.de (Timm Friebe) --=-pbPhfAmVrOOTToLc/Wzs Content-Type: text/plain Content-Transfer-Encoding: 7bit On Thu, 2003-05-22 at 23:44, Timm Friebe wrote: [...] > These patches to php_incomplete_class.h and var_unserializer.re, though > not thoroughly tested, fix this. Here's a patch to php_incomplete_class.h with corrected whitespace. Some lines were indented with spaces instead of tabs... - Timm --=-pbPhfAmVrOOTToLc/Wzs Content-Disposition: attachment; filename=php_incomplete_class.h.diff Content-Type: text/x-patch; name=php_incomplete_class.h.diff; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Index: ext/standard/php_incomplete_class.h =================================================================== RCS file: /repository/php4/ext/standard/php_incomplete_class.h,v retrieving revision 1.10 diff -u -r1.10 php_incomplete_class.h --- ext/standard/php_incomplete_class.h 31 Dec 2002 16:07:52 -0000 1.10 +++ ext/standard/php_incomplete_class.h 22 May 2003 22:18:09 -0000 @@ -26,14 +26,29 @@ #define PHP_IC_ENTRY \ BG(incomplete_class) -#define PHP_SET_CLASS_ATTRIBUTES(struc) \ - /* OBJECTS_FIXME: Fix for new object model */ \ - if (Z_OBJCE_P(struc) == BG(incomplete_class)) { \ - class_name = php_lookup_class_name(struc, &name_len, 1); \ - free_class_name = 1; \ - } else { \ - class_name = Z_OBJCE_P(struc)->name; \ - name_len = Z_OBJCE_P(struc)->name_length; \ +#define PHP_SET_CLASS_ATTRIBUTES(struc) \ + if (Z_OBJCE_P(struc) == BG(incomplete_class)) { \ + class_name = php_lookup_class_name(struc, &name_len, 1); \ + free_class_name = 1; \ + } else { \ + if (Z_OBJ_HT_P(struc)->get_class_name == NULL || \ + Z_OBJ_HT_P(struc)->get_class_name(struc, &class_name, &name_len, 0 TSRMLS_CC) != SUCCESS) { \ + zend_class_entry *ce; \ + ce = zend_get_class_entry(struc TSRMLS_CC); \ + if (!ce) { \ + class_name = php_lookup_class_name(struc, &name_len, 1); \ + free_class_name = 1; \ + } \ + if (ce->ns) { \ + zend_make_full_classname(ce, &class_name, &name_len); \ + free_class_name = 1; \ + } else { \ + class_name = Z_OBJCE_P(struc)->name; \ + name_len = Z_OBJCE_P(struc)->name_length; \ + } \ + } else { \ + free_class_name = 1; \ + } \ } #define PHP_CLEANUP_CLASS_ATTRIBUTES() \ --=-pbPhfAmVrOOTToLc/Wzs--