]> granicus.if.org Git - php/commitdiff
Keep the DBA DB4 test status quo after Berkeley DB 5.2 introduced error message prefixes
authorChristopher Jones <sixd@php.net>
Mon, 27 Jun 2011 22:58:59 +0000 (22:58 +0000)
committerChristopher Jones <sixd@php.net>
Mon, 27 Jun 2011 22:58:59 +0000 (22:58 +0000)
ext/dba/dba_db4.c

index a93548538787529a2e2c6082064e6e37c3d7ea64..b47aed160c51f003198c39259a889015aa4fd1b1 100644 (file)
@@ -46,11 +46,12 @@ static void php_dba_db4_errcall_fcn(
 
 #if (DB_VERSION_MAJOR == 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8))
 /* Bug 51086, Berkeley DB 4.8.26 */
-/* This code suppresses a BDB 4.8 error message that BDB incorrectly emits */
+/* This code suppresses a BDB 4.8+ error message, thus keeping PHP test compatibility */
        {
                char *function = get_active_function_name(TSRMLS_C);
                if (function && (!strcmp(function,"dba_popen") || !strcmp(function,"dba_open"))
-                       && !strncmp(msg, "fop_read_meta", sizeof("fop_read_meta")-1)) {
+                       && (!strncmp(msg, "fop_read_meta", sizeof("fop_read_meta")-1)
+                               || !strncmp(msg, "BDB0004 fop_read_meta", sizeof("BDB0004 fop_read_meta")-1))) {
                        return;
                }
        }