1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 07:58:20 +02:00

Boolify pdo_stmt_describe_columns()

This commit is contained in:
George Peter Banyard
2021-03-12 03:05:04 +00:00
parent 63c4e8b5ab
commit 262744ff0d
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -1084,7 +1084,7 @@ PHP_METHOD(PDO, query)
/* now execute the statement */
PDO_STMT_CLEAR_ERR();
if (stmt->methods->executer(stmt)) {
int ret = 1;
bool ret = true;
if (!stmt->executed) {
if (stmt->dbh->alloc_own_columns) {
ret = pdo_stmt_describe_columns(stmt);
+3 -3
View File
@@ -125,7 +125,7 @@ iterate:
}
/* }}} */
int pdo_stmt_describe_columns(pdo_stmt_t *stmt) /* {{{ */
bool pdo_stmt_describe_columns(pdo_stmt_t *stmt) /* {{{ */
{
int col;
@@ -133,7 +133,7 @@ int pdo_stmt_describe_columns(pdo_stmt_t *stmt) /* {{{ */
for (col = 0; col < stmt->column_count; col++) {
if (!stmt->methods->describer(stmt, col)) {
return 0;
return false;
}
/* if we are applying case conversions on column names, do so now */
@@ -168,7 +168,7 @@ int pdo_stmt_describe_columns(pdo_stmt_t *stmt) /* {{{ */
}
}
return 1;
return true;
}
/* }}} */
+1 -1
View File
@@ -39,7 +39,7 @@ extern zend_class_entry *pdo_dbstmt_ce;
void pdo_dbstmt_free_storage(zend_object *std);
zend_object_iterator *pdo_stmt_iter_get(zend_class_entry *ce, zval *object, int by_ref);
extern zend_object_handlers pdo_dbstmt_object_handlers;
int pdo_stmt_describe_columns(pdo_stmt_t *stmt);
bool pdo_stmt_describe_columns(pdo_stmt_t *stmt);
bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_arg_num,
zval *args, uint32_t variadic_num_args);