diff options
author | Jakub Zelenka <bukka@php.net> | 2016-01-06 14:43:07 +0000 |
---|---|---|
committer | Jakub Zelenka <bukka@php.net> | 2016-01-06 14:43:07 +0000 |
commit | ae0ce19fa86377e5ab230ab9dca8f8dbd9826fd7 (patch) | |
tree | 360c977fa1f03c2db397743988cd003e2321e44c /ext/pdo_pgsql/pgsql_driver.c | |
parent | 55abb5d39501ca0fa9bc704198785b1f98c95bb2 (diff) | |
parent | 7302b72d6e6bb77446599ec29a3b89702a506025 (diff) | |
download | php-git-ae0ce19fa86377e5ab230ab9dca8f8dbd9826fd7.tar.gz |
Merge branch 'master' into openssl_aead
Diffstat (limited to 'ext/pdo_pgsql/pgsql_driver.c')
-rw-r--r-- | ext/pdo_pgsql/pgsql_driver.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index 9f75f17cfe..3f92525506 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2015 The PHP Group | + | Copyright (c) 1997-2016 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -1152,16 +1152,15 @@ static const zend_function_entry *pdo_pgsql_get_driver_methods(pdo_dbh_t *dbh, i static int pdo_pgsql_set_attr(pdo_dbh_t *dbh, zend_long attr, zval *val) { + zend_bool bval = zval_get_long(val)? 1 : 0; pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh->driver_data; switch (attr) { case PDO_ATTR_EMULATE_PREPARES: - convert_to_long(val); - H->emulate_prepares = 0 != Z_LVAL_P(val); + H->emulate_prepares = bval; return 1; case PDO_PGSQL_ATTR_DISABLE_PREPARES: - convert_to_long(val); - H->disable_prepares = 0 != Z_LVAL_P(val); + H->disable_prepares = bval; return 1; default: return 0; |