]> granicus.if.org Git - php/commitdiff
fix #35543 (php crash when calling non existing method of a class that extends PDO)
authorAntony Dovgal <tony2001@php.net>
Sun, 4 Dec 2005 11:40:52 +0000 (11:40 +0000)
committerAntony Dovgal <tony2001@php.net>
Sun, 4 Dec 2005 11:40:52 +0000 (11:40 +0000)
ext/pdo/pdo_dbh.c

index 6d98af2b5b7a5e2f010b8c77c585f21be41e4e03..96a6047d6c447e3375eea5e30e8388aabdcc3ab6 100755 (executable)
@@ -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,