From f65f6b9dcb9ec89df3a86e08ced79cd1c28ea0e8 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 13 Jun 2025 18:12:22 +0100 Subject: [PATCH] ext/pdo_sqlite: explain statement prefixing with its class for errors. --- ext/pdo_sqlite/sqlite_statement.c | 2 +- .../tests/subclasses/pdo_sqlite_getsetattr_explain.phpt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c index e683cc5ed51b..31fb98f887e0 100644 --- a/ext/pdo_sqlite/sqlite_statement.c +++ b/ext/pdo_sqlite/sqlite_statement.c @@ -431,7 +431,7 @@ static int pdo_sqlite_stmt_set_attribute(pdo_stmt_t *stmt, zend_long attr, zval return 0; } if (Z_LVAL_P(zval) < 0 || Z_LVAL_P(zval) > 2) { - zend_value_error("explain mode must be one of the EXPLAIN_MODE_* constants"); + zend_value_error("explain mode must be one of the Pdo\\Sqlite::EXPLAIN_MODE_* constants"); return 0; } if (sqlite3_stmt_explain(S->stmt, (int)Z_LVAL_P(zval)) != SQLITE_OK) { diff --git a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_getsetattr_explain.phpt b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_getsetattr_explain.phpt index c91fb892477b..73a160e1d813 100644 --- a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_getsetattr_explain.phpt +++ b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_getsetattr_explain.phpt @@ -395,6 +395,6 @@ array(2) { } explain mode must be of type int, string given explain mode must be of type int, Duh given -explain mode must be one of the EXPLAIN_MODE_* constants -explain mode must be one of the EXPLAIN_MODE_* constants +explain mode must be one of the Pdo\Sqlite::EXPLAIN_MODE_* constants +explain mode must be one of the Pdo\Sqlite::EXPLAIN_MODE_* constants bool(true)