Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4161 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3321 invoked by uid 1010); 24 Aug 2003 22:06:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 3187 invoked from network); 24 Aug 2003 22:06:31 -0000 Received: from unknown (HELO bugge.potatoe.com) (216.240.48.15) by pb1.pair.com with SMTP; 24 Aug 2003 22:06:31 -0000 Received: from potatoe.com (localhost [127.0.0.1]) by bugge.potatoe.com (8.12.9/8.12.2) with ESMTP id h7OM91cg012760 for ; Sun, 24 Aug 2003 15:09:02 -0700 (PDT) Message-ID: <3F49377B.1000306@potatoe.com> Date: Sun, 24 Aug 2003 15:08:59 -0700 Organization: The Madfish Group User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5b) Gecko/20030815 Thunderbird/0.2a X-Accept-Language: en-us, en MIME-Version: 1.0 To: internals@lists.php.net References: <3F492064.2050809@potatoe.com> In-Reply-To: <3F492064.2050809@potatoe.com> Content-Type: multipart/mixed; boundary="------------070801060908050001000100" Subject: Re: [PHP-DEV] "internal zval's" error on 'var $x=array();' From: tater@potatoe.com (Brad Bulger) --------------070801060908050001000100 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Yes, just moving the ARRAY cases in zend_API.c and zend_variables.c stopped the error, and so far it *seems* to work. that can't be real fix, but i hope it is helpful (diffs attached) Brad Bulger wrote: > this is with current php-src: it looks related to recent changes to > zend_API, maybe, i haven't tracked it down yet, figured someone here > could do that faster - and fix it too, heh: > > sh-2.05a# php -v > PHP 5.0.0b2-dev (cli) (built: Aug 24 2003 12:40:08) (DEBUG) > > sh-2.05a# php -r 'class foo { var $x = array(); }' > > Fatal error: Internal zval's can't be arrays, objects or resources in > Unknown on line 0 > --------------070801060908050001000100 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="zend_API.c.diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="zend_API.c.diff.txt" Index: zend_API.c =================================================================== RCS file: /repository/ZendEngine2/zend_API.c,v retrieving revision 1.210 diff -u -r1.210 zend_API.c --- zend_API.c 24 Aug 2003 18:47:11 -0000 1.210 +++ zend_API.c 24 Aug 2003 22:03:31 -0000 @@ -1630,12 +1630,12 @@ target_symbol_table = &ce->default_properties; } switch(Z_TYPE_P(property)) { - case IS_ARRAY: - case IS_CONSTANT_ARRAY: case IS_OBJECT: case IS_RESOURCE: - zend_error(E_CORE_ERROR, "Internal zval's can't be arrays, objects or resources"); + zend_error(E_CORE_ERROR, "zend_API: Internal zval's can't be arrays, objects or resources"); break; + case IS_ARRAY: + case IS_CONSTANT_ARRAY: default: break; } --------------070801060908050001000100 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="zend_variables.c.diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="zend_variables.c.diff.txt" Index: zend_variables.c =================================================================== RCS file: /repository/ZendEngine2/zend_variables.c,v retrieving revision 1.53 diff -u -r1.53 zend_variables.c --- zend_variables.c 24 Aug 2003 17:32:47 -0000 1.53 +++ zend_variables.c 24 Aug 2003 22:03:55 -0000 @@ -90,12 +90,12 @@ free(zvalue->value.str.val); } break; - case IS_ARRAY: - case IS_CONSTANT_ARRAY: case IS_OBJECT: case IS_RESOURCE: - zend_error(E_CORE_ERROR, "Internal zval's can't be arrays, objects or resources"); + zend_error(E_CORE_ERROR, "zend_variables: Internal zval's can't be arrays, objects or resources"); break; + case IS_ARRAY: + case IS_CONSTANT_ARRAY: case IS_LONG: case IS_DOUBLE: case IS_BOOL: --------------070801060908050001000100--