Commit aa847c0bdf0 for php.net
commit aa847c0bdf04023aebb7b4b74b5dcbf6c909aa3b
Author: NickSdot <32384907+NickSdot@users.noreply.github.com>
Date: Sun Aug 9 21:27:40 2026 +0700
ext/pdo: applied fixers to improve test robustness (#23023)
diff --git a/ext/pdo/tests/pdo_036.phpt b/ext/pdo/tests/pdo_036.phpt
index 10fe2219301..113c4f05550 100644
--- a/ext/pdo/tests/pdo_036.phpt
+++ b/ext/pdo/tests/pdo_036.phpt
@@ -17,7 +17,7 @@
$x->queryString = "SELECT 2";
var_dump($x);
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
$instance = new reflectionclass('pdorow');
@@ -34,7 +34,7 @@
["queryString"]=>
string(8) "SELECT 1"
}
-Property queryString is read only
+Error: Property queryString is read only
Fatal error: Uncaught PDOException: You may not create a PDORow manually in %spdo_036.php:%d
Stack trace:
diff --git a/ext/pdo/tests/pdo_uninitialized.phpt b/ext/pdo/tests/pdo_uninitialized.phpt
index e3b4c96af81..792776ea4ab 100644
--- a/ext/pdo/tests/pdo_uninitialized.phpt
+++ b/ext/pdo/tests/pdo_uninitialized.phpt
@@ -16,24 +16,24 @@ public function __construct() {}
try {
$pdo->query("foo");
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
$stmt = new MyPDOStatement;
try {
$stmt->fetch();
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
$stmt = new MyPDOStatement;
try {
foreach ($stmt as $row) {}
} catch (Error $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}
?>
--EXPECT--
-MyPDO object is uninitialized
-MyPDOStatement object is uninitialized
-MyPDOStatement object is uninitialized
+Error: MyPDO object is uninitialized
+Error: MyPDOStatement object is uninitialized
+Error: MyPDOStatement object is uninitialized