summaryrefslogtreecommitdiff
path: root/ext/dba/tests/bug65708.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dba/tests/bug65708.phpt')
-rw-r--r--ext/dba/tests/bug65708.phpt38
1 files changed, 38 insertions, 0 deletions
diff --git a/ext/dba/tests/bug65708.phpt b/ext/dba/tests/bug65708.phpt
new file mode 100644
index 0000000000..b77138f6ed
--- /dev/null
+++ b/ext/dba/tests/bug65708.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Bug #65708 (dba functions cast $key param to string in-place, bypassing copy on write)
+--SKIPIF--
+<?php
+ require_once(dirname(__FILE__) .'/skipif.inc');
+?>
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+require_once(dirname(__FILE__) .'/test.inc');
+
+$db = dba_popen($db_filename, 'c');
+
+$key = 1;
+$copy = $key;
+
+echo gettype($key)."\n";
+echo gettype($copy)."\n";
+
+dba_exists($key, $db);
+
+echo gettype($key)."\n";
+echo gettype($copy)."\n";
+
+dba_close($db);
+
+?>
+--CLEAN--
+<?php
+ require(dirname(__FILE__) .'/clean.inc');
+?>
+--EXPECT--
+integer
+integer
+integer
+integer