Skip to content

Commit 4a1c50b

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
2 parents 7f70911 + bfe63f5 commit 4a1c50b

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

ext/pdo/tests/gh8626.phpt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,14 @@ $stmt = $db->prepare('INSERT INTO test VALUES(?)');
2424
// fail
2525
var_dump($stmt->execute([null]), $stmt->errorCode());
2626
$errorInfo = $stmt->errorInfo();
27-
if (isset($errorInfo[3])) {
28-
unset($errorInfo[3]); // odbc
29-
}
30-
var_dump($errorInfo);
27+
var_dump(array_slice($errorInfo, 0, 3)); // odbc, dblib
3128

3229
$stmt->closeCursor(); // sqlite
3330

3431
// success
3532
var_dump($stmt->execute([1]), $stmt->errorCode());
3633
$errorInfo = $stmt->errorInfo();
37-
if (isset($errorInfo[3])) {
38-
unset($errorInfo[3]); // odbc
39-
}
40-
var_dump($errorInfo);
34+
var_dump(array_slice($errorInfo, 0, 3)); // odbc, dblib
4135
?>
4236
===DONE===
4337
--EXPECTF--

0 commit comments

Comments
 (0)