-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Follow up #77849 PDOStatement objects in undefined state after clone
- Loading branch information
Showing
2 changed files
with
19 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|