summaryrefslogtreecommitdiff
path: root/ext/pdo/tests
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2019-04-06 01:27:58 +0200
committerJoe Watkins <krakjoe@php.net>2019-04-06 01:27:58 +0200
commit0c6a68fa362be996d9a027ef4847c52a6bfa7873 (patch)
tree0b7ae2a9096077f91839f6684430f46bc7f8fda7 /ext/pdo/tests
parent0d5be6ce91701bcb47efe7a520189e035e38cd08 (diff)
parenta2b8a62abf905f02504c81d7dd868ac83dfc7207 (diff)
downloadphp-git-0c6a68fa362be996d9a027ef4847c52a6bfa7873.tar.gz
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Follow up #77849 PDOStatement objects in undefined state after clone
Diffstat (limited to 'ext/pdo/tests')
-rw-r--r--ext/pdo/tests/bug_77849_2.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/pdo/tests/bug_77849_2.phpt b/ext/pdo/tests/bug_77849_2.phpt
new file mode 100644
index 0000000000..53a0735e97
--- /dev/null
+++ b/ext/pdo/tests/bug_77849_2.phpt
@@ -0,0 +1,18 @@
+--TEST--
+PDO Common: Bug #77849 (inconsistent state of cloned statament object)
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo')) die('skip');
+?>
+--FILE--
+<?php
+$stmt = new PDOStatement();
+
+clone $stmt;
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: Trying to clone an uncloneable object of class PDOStatement in %s:4
+Stack trace:
+#0 {main}
+ thrown in %s on line 4
+