summaryrefslogtreecommitdiff
path: root/ext/pdo_odbc/odbc_driver.c
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-12-23 14:15:56 +0100
committerGeorge Peter Banyard <girgias@php.net>2021-01-06 10:20:59 +0000
commit43f69160cfac8e33969e059eeab756a223be4480 (patch)
treecfefbb5e91f4632023658f5d9721e962c83175de /ext/pdo_odbc/odbc_driver.c
parentd04adf60bee30a167845644c3d480583ca755420 (diff)
downloadphp-git-43f69160cfac8e33969e059eeab756a223be4480.tar.gz
Boolify PDO's set_attribute driver function
Diffstat (limited to 'ext/pdo_odbc/odbc_driver.c')
-rw-r--r--ext/pdo_odbc/odbc_driver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c
index 732512eb58..e9a8b640cb 100644
--- a/ext/pdo_odbc/odbc_driver.c
+++ b/ext/pdo_odbc/odbc_driver.c
@@ -334,18 +334,18 @@ static bool odbc_handle_rollback(pdo_dbh_t *dbh)
return true;
}
-static int odbc_handle_set_attr(pdo_dbh_t *dbh, zend_long attr, zval *val)
+static bool odbc_handle_set_attr(pdo_dbh_t *dbh, zend_long attr, zval *val)
{
pdo_odbc_db_handle *H = (pdo_odbc_db_handle *)dbh->driver_data;
switch (attr) {
case PDO_ODBC_ATTR_ASSUME_UTF8:
H->assume_utf8 = zval_is_true(val);
- return 1;
+ return true;
default:
strcpy(H->einfo.last_err_msg, "Unknown Attribute");
H->einfo.what = "setAttribute";
strcpy(H->einfo.last_state, "IM001");
- return 0;
+ return false;
}
}