summaryrefslogtreecommitdiff
path: root/ext/dba/tests/bug49125.phpt
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2009-08-01 23:10:11 +0000
committerFelipe Pena <felipe@php.net>2009-08-01 23:10:11 +0000
commit1838e818cb842514e0ac2fe376d362ff8e0209e3 (patch)
treeab2d51d341b416331dd538986f6e67c237a11423 /ext/dba/tests/bug49125.phpt
parentd47dc13042815e66ccd0410baebc2c5aa93651b8 (diff)
downloadphp-git-1838e818cb842514e0ac2fe376d362ff8e0209e3.tar.gz
- Fixed bug #49125 (Error in dba_exists C code)
patch by: jdornan at stanford dot edu
Diffstat (limited to 'ext/dba/tests/bug49125.phpt')
-rw-r--r--ext/dba/tests/bug49125.phpt27
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/dba/tests/bug49125.phpt b/ext/dba/tests/bug49125.phpt
new file mode 100644
index 0000000000..3724b89c93
--- /dev/null
+++ b/ext/dba/tests/bug49125.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #49125 (Error in dba_exists C code)
+--SKIPIF--
+<?php
+ $handler = 'db4';
+ require_once dirname(__FILE__) .'/skipif.inc';
+?>
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+$handler = 'db4';
+require_once dirname(__FILE__) .'/test.inc';
+
+$db = dba_popen($db_filename, 'c', 'db4');
+
+dba_insert('foo', 'foo', $db);
+
+var_dump(dba_exists('foo', $db));
+
+dba_close($db);
+
+unlink($db_filename);
+
+--EXPECT--
+bool(true)