We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc46a4e commit 56f5a8bCopy full SHA for 56f5a8b
ext/pdo_sqlite/tests/gh13998.phpt
@@ -0,0 +1,25 @@
1
+--TEST--
2
+Fix GH-13998: If length of errmsg is 0, do not call add_next_index_string
3
+--EXTENSIONS--
4
+pdo_sqlite
5
+--FILE--
6
+<?php
7
+$step = function () {
8
+ throw new Exception();
9
+};
10
+$finalize = function () {
11
12
+
13
+$db = new PDO('sqlite::memory:');
14
+$db->query('CREATE TABLE test (a int)');
15
+$stmt = $db->query('INSERT INTO test VALUES (1)');
16
+$db->sqliteCreateAggregate('S', $step, $finalize, 1);
17
18
+try {
19
+ $db->query('SELECT S(a) FROM test');
20
+} catch (Exception $e) {
21
+ echo 'done!';
22
+}
23
+?>
24
+--EXPECT--
25
+done!
0 commit comments