Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c
| From: | Andi Gutmans | Date: | Wed, 02 Jul 2003 21:44:44 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c | ||
| References: | 1 2 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-1439@lists.php.net to get a copy of this message | ||
Oh, I only looked at the patch and not at its context :)
Andi
At 04:00 PM 2/7/2003 -0400, Sterling Hughes wrote:
On Wed, 2003-07-02 at 17:20, Andi Gutmans wrote: This doesn't look right. There's a reason why we have the get_class_name() callback. What am I missing? Andi Right. The problem was this was supposed to access the parent class, not the current class. If a parent class didn't exist, and you passed an object, you would get the class name of the current class. Using get_class_name() was inappropriate here, as it was getting the class name of the current class, not the parent class. -Sterling At 04:31 AM 2/7/2003 +0000, Sterling Hughes wrote:+----------------------------------------------------------------------+sterling Wed Jul 2 00:31:33 2003 EDTModified files:/ZendEngine2 zend_builtin_functions.cLog: Fix bug #24445 Index: ZendEngine2/zend_builtin_functions.c diff -u ZendEngine2/zend_builtin_functions.c:1.197 ZendEngine2/zend_builtin_functions.c:1.198 --- ZendEngine2/zend_builtin_functions.c:1.197 Mon Jun 30 15:52:47 2003+++ ZendEngine2/zend_builtin_functions.c Wed Jul 2 00:31:33 2003@@ -17,7 +17,7 @@*/ -/* $Id: zend_builtin_functions.c,v 1.197 2003/06/30 19:52:47 sterlingExp$ */ +/* $Id: zend_builtin_functions.c,v 1.198 2003/07/02 04:31:33 sterlingExp$ */ #include "zend.h" #include "zend_API.h" @@ -557,15 +557,7 @@-- "The three most dangerous things in the world are a programmer with a soldering iron, a hardware type with a program patch and a user with an idea."}if (Z_TYPE_PP(arg) == IS_OBJECT) {-- if (Z_OBJ_HT_PP(arg)->get_class_name - && Z_OBJ_HT_PP(arg)->get_class_name(*arg, &name,&name_length, 1 TSRMLS_CC) == SUCCESS) {- RETURN_STRINGL(name, name_length, 0); - } else if (Z_OBJ_HT_PP(arg)->get_class_entry && (ce =zend_get_class_entry(*arg TSRMLS_CC))) {- RETURN_STRINGL(ce->name, ce->name_length, 1); - } else { - RETURN_FALSE; - } + ce = zend_get_class_entry(*arg TSRMLS_CC); } else if (Z_TYPE_PP(arg) == IS_STRING) { zend_class_entry **pce;-- Zend Engine CVS Mailing List (http://cvs.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php- Unknown