]> granicus.if.org Git - php/commitdiff
MFH: - Fixed bug #47769 (Strange extends PDO)
authorFelipe Pena <felipe@php.net>
Fri, 27 Mar 2009 16:50:38 +0000 (16:50 +0000)
committerFelipe Pena <felipe@php.net>
Fri, 27 Mar 2009 16:50:38 +0000 (16:50 +0000)
NEWS
ext/pdo/pdo_dbh.c

diff --git a/NEWS b/NEWS
index 0b2043c3b7b1ec9c81188ed8291c9b093d990b03..11a94b074f43d55125ad5d3a4a1f0a1d8febfd51 100644 (file)
--- 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).
index 22d95f3bf46496fc46c1d09853b67c04469070fb..a898e719aeca08549189bab11c5e4521f1f88553 100755 (executable)
@@ -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;
 }