tony2001 Wed Jul 5 11:48:17 2006 UTC Modified files: /php-src/ext/mysqli mysqli.c Log: fix bug #38003(in classes inherited from mysqli it's possible to call private constructors from invalid context) also, use appropriate macro instead of accessing structure elements directly http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli.c?r1=1.90&r2=1.91&diff_format=u Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.90 php-src/ext/mysqli/mysqli.c:1.91 --- php-src/ext/mysqli/mysqli.c:1.90 Tue Jun 13 13:12:19 2006 +++ php-src/ext/mysqli/mysqli.c Wed Jul 5 11:48:17 2006 @@ -15,7 +15,7 @@ | Author: Georg Richter <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: mysqli.c,v 1.90 2006/06/13 13:12:19 dmitry Exp $ + $Id: mysqli.c,v 1.91 2006/07/05 11:48:17 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H @@ -293,11 +293,12 @@ static union _zend_function *php_mysqli_constructor_get(zval *object TSRMLS_DC) { mysqli_object *obj = (mysqli_object *)zend_objects_get_address(object TSRMLS_CC); + zend_class_entry * ce = Z_OBJCE_P(object); - if (obj->zo.ce != mysqli_link_class_entry && obj->zo.ce != mysqli_stmt_class_entry && - obj->zo.ce != mysqli_result_class_entry && obj->zo.ce != mysqli_driver_class_entry && - obj->zo.ce != mysqli_warning_class_entry) { - return obj->zo.ce->constructor; + if (ce != mysqli_link_class_entry && ce != mysqli_stmt_class_entry && + ce != mysqli_result_class_entry && ce != mysqli_driver_class_entry && + ce != mysqli_warning_class_entry) { + return zend_std_get_constructor(object TSRMLS_CC); } else { static zend_internal_function f;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php