]> granicus.if.org Git - php/commitdiff
Add test for bug #28112
authorMarcus Boerger <helly@php.net>
Thu, 22 Apr 2004 22:29:41 +0000 (22:29 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 22 Apr 2004 22:29:41 +0000 (22:29 +0000)
ext/sqlite/tests/bug28112.phpt [new file with mode: 0755]

diff --git a/ext/sqlite/tests/bug28112.phpt b/ext/sqlite/tests/bug28112.phpt
new file mode 100755 (executable)
index 0000000..551e617
--- /dev/null
@@ -0,0 +1,14 @@
+--TEST--
+#28112 (sqlite_query() crashing apache on malformed query)
+--FILE--
+<?php
+
+if (!($db = sqlite_open(":memory:", 666, $error))) die ("Couldn't open the database");
+sqlite_query($db, "create table frob (foo INTEGER PRIMARY KEY, bar text);");
+$res = sqlite_array_query($db, "");
+
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECTF--
+===DONE===