From: Antony Dovgal Date: Sun, 4 Dec 2005 11:40:52 +0000 (+0000) Subject: fix #35543 (php crash when calling non existing method of a class that extends PDO) X-Git-Tag: RELEASE_1_1_1~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c7631a2dca6c4ecac0c3e81faa7e5afffe179885;p=php 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 6d98af2b5b..96a6047d6c 100755 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -1110,7 +1110,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,