From: Antony Dovgal Date: Sun, 4 Dec 2005 11:41:13 +0000 (+0000) Subject: MFH: fix #35543 (php crash when calling non existing method of a class that extends... X-Git-Tag: php-5.1.2RC1~232 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d72347f7bc3b59a5484072af506620368e55f426;p=php MFH: fix #35543 (php crash when calling non existing method of a class that extends PDO) --- diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 23c852553a..27c61d9498 100755 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -1112,7 +1112,7 @@ int pdo_hash_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC) int namelen; char *lc_name; - if (!dbh->methods->get_driver_methods) { + if (!dbh || !dbh->methods || !dbh->methods->get_driver_methods) { return 0; } funcs = dbh->methods->get_driver_methods(dbh,