#39260 [Opn->Csd]: A misleading bit in the Zend API
| From: | tony2001@php.net | Date: | Thu, 26 Oct 2006 09:29:19 +0000 |
| Subject: | #39260 [Opn->Csd]: A misleading bit in the Zend API | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-104002@lists.php.net to get a copy of this message | ||
ID: 39260
Updated by: tony2001@php.net
Reported By: sfox@php.net
-Status: Open
+Status: Closed
Bug Type: Scripting Engine problem
Operating System: irrelevant
PHP Version: 5.2.0RC5
New Comment:
Fixed in HEAD, I'll MFH it as soon as 5.2 is open for commits again.
Previous Comments:
------------------------------------------------------------------------
[2006-10-26 01:57:40] sfox@php.net
Description:
------------
Not the biggest bug in the world, more a mosquito...
In zend_compile.h:
ZEND_API int zend_unmangle_property_name(char *mangled_property, int
mangled_property_len, char **prop_name, char **class_name);
In zend_compile.c:
ZEND_API int zend_unmangle_property_name(char *mangled_property, int
len, char **class_name, char **prop_name)
Someone's obviously noticed this a long time ago - on SUCCESS we have:
*class_name = mangled_property+1;
*prop_name = (*class_name)+class_name_len;
and nobody writing for PECL seems to have made the obvious mistake
(yet). But somebody, somewhere, will.
The declaration in the header file obviously needs changing to match
the source file, and as for the implementation - well, it might just be
nice to make it read more sanely :) If I trusted myself to do that
without somehow messing it up along the way and breaking practically
every extension out there, there'd be a patch with this report. I'm
afraid I don't, sorry.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39260&edit=1