From 0f6e28103403f8a6a1aac0ccfefdf9c0b80dbe97 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johannes=20Schl=C3=BCter?= Date: Tue, 16 Sep 2008 23:37:35 +0000 Subject: [PATCH] MFH Fix #44424 (Extending PDO/MySQL class with a __call() function doesn't work) --- NEWS | 2 ++ ext/pdo/pdo_dbh.c | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 7850aec94e..6ad6c075d3 100644 --- a/NEWS +++ b/NEWS @@ -102,6 +102,8 @@ PHP NEWS (Hannes) - Fixed bug #44617 (wrong HTML entity output when substitute_character=entity). (Moriyoshi) +- Fixed bug #44425 (Extending PDO/MySQL class with a __call() function doesn't + work). (Johannes) - Fixed bug #44246 (closedir() accepts a file resource opened by fopen()). (Dmitry, Tony) - Fixed bug #44127 (UNIX abstract namespace socket connect does not work). diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index fda9a08a2a..699855b81e 100755 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -1291,9 +1291,7 @@ 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 (std_object_handlers.get_method) { - fbc = std_object_handlers.get_method(object_pp, lc_method_name, method_len TSRMLS_CC); - } + if (!fbc) { fbc = NULL; } @@ -1304,6 +1302,12 @@ static union _zend_function *dbh_method_get( } 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; } -- 2.50.1