MFH: fix #35543 (php crash when calling non existing method of a class that extends...
authorAntony Dovgal <tony2001@php.net>
Sun, 4 Dec 2005 11:41:13 +0000 (11:41 +0000)
committerAntony Dovgal <tony2001@php.net>
Sun, 4 Dec 2005 11:41:13 +0000 (11:41 +0000)
ext/pdo/pdo_dbh.c

index 23c852553a4ac8a4b0662c9259149015283effae..27c61d9498cea3b783a131b4028071fbd4f3b81d 100755 (executable)
@@ -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,