From: Felipe Pena Date: Fri, 27 Mar 2009 16:50:38 +0000 (+0000) Subject: MFH: - Fixed bug #47769 (Strange extends PDO) X-Git-Tag: php-5.2.10RC1~265 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65d1a3a4412a529f454442a109cd6fb8bcf8db9b;p=php MFH: - Fixed bug #47769 (Strange extends PDO) --- diff --git a/NEWS b/NEWS index 0b2043c3b7..11a94b074f 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ - Fixed memory leak in ob_get_clean/ob_get_flush. (Christian) - Fixed bug #47772 (FILTER_VALIDATE_EMAIL allows foo@bar. addresses). (Ilia) +- Fixed bug #47769 (Strange extends PDO). (Felipe) - Fixed bug #47721 (Alignment issues in mbstring and sysvshm extension) (crrodriguez at opensuse dot org, Ilia) - Fixed bug #47704 (PHP crashes on some "bad" operations with string offsets). diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 22d95f3bf4..a898e719ae 100755 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -1277,7 +1277,7 @@ static union _zend_function *dbh_method_get( lc_method_name = emalloc(method_len + 1); zend_str_tolower_copy(lc_method_name, method_name, method_len); - if (zend_hash_find(&dbh->ce->function_table, lc_method_name, method_len+1, (void**)&fbc) == FAILURE) { + if ((fbc = std_object_handlers.get_method(object_pp, lc_method_name, method_len TSRMLS_CC)) == NULL) { /* not a pre-defined method, nor a user-defined method; check * the driver specific methods */ if (!dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_DBH]) { @@ -1290,23 +1290,14 @@ static union _zend_function *dbh_method_get( if (zend_hash_find(dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_DBH], lc_method_name, method_len+1, (void**)&fbc) == FAILURE) { - if (!fbc) { fbc = NULL; } - - goto out; } /* got it */ } out: - if (!fbc) { - if (std_object_handlers.get_method) { - fbc = std_object_handlers.get_method(object_pp, lc_method_name, method_len TSRMLS_CC); - } - } - efree(lc_method_name); return fbc; }