RPA Toolkit
work on the PHP extension.
authorMartin Stoilov <martin@rpasearch.com>
Mon, 20 Jun 2011 04:15:41 +0000 (21:15 -0700)
committerMartin Stoilov <martin@rpasearch.com>
Mon, 20 Jun 2011 04:15:41 +0000 (21:15 -0700)
phpext/prpa/prpa.c
phpext/prpa/tests/009.phpt

index 3868b3c..f53ef14 100644 (file)
@@ -534,7 +534,7 @@ static rchar *dbexmsg[] = {
        "Syntax error.",
        "Unresolved expression name.",
        "Invalid parameter.",
        "Syntax error.",
        "Unresolved expression name.",
        "Invalid parameter.",
-       "Unknown",
+       "Failed to compile rule.",
        "Unknown",
        "Unknown",
        "Unknown",
        "Unknown",
        "Unknown",
        "Unknown",
index 6f817c3..d221b71 100644 (file)
@@ -19,8 +19,10 @@ rpa_dbex_parse($hDbex, $pattern, $myname)
                echo(rpa_dbex_error($hDbex) . "\n");
        }
        
                echo(rpa_dbex_error($hDbex) . "\n");
        }
        
-//     rpa_dbex_close($hDbex);
-       rpa_dbex_compile($hDbex);
+       rpa_dbex_close($hDbex);
+       if (rpa_dbex_compile($hDbex) < 0) {
+               die(rpa_dbex_error($hDbex). "\n");      
+       }
        $pattern = rpa_dbex_lookup($hDbex, "name");
        if ($pattern == -1) {
                die(rpa_dbex_error($hDbex). "\n");
        $pattern = rpa_dbex_lookup($hDbex, "name");
        if ($pattern == -1) {
                die(rpa_dbex_error($hDbex). "\n");