com php-src: Fixed incorrect Z_LVAL() usage: ext/pg sql/pgsql.c
| From: | Dmitry Stogov | Date: | Mon, 19 May 2014 08:51:48 +0000 |
| Subject: | com php-src: Fixed incorrect Z_LVAL() usage: ext/pg sql/pgsql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-78464@lists.php.net to get a copy of this message | ||
Commit: 35f23d9ee7f1260ee6a1625c2251a41f7529405c
Author: Dmitry Stogov <dmitry@zend.com> Mon, 19 May 2014 12:51:48 +0400
Parents: 850661885013a2af1421939548eece9f3936a5ff
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=35f23d9ee7f1260ee6a1625c2251a41f7529405c
Log:
Fixed incorrect Z_LVAL() usage
Changed paths:
M ext/pgsql/pgsql.c
Diff:
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 9d8cf2d..550c1dd 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -3036,7 +3036,7 @@ PHP_FUNCTION(pg_free_result)
}
ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, result, -1, "PostgreSQL result",
le_result);
- if (Z_LVAL_P(result) == 0) {
+ if (Z_RES_P(result) == NULL) {
RETURN_FALSE;
}
zend_list_close(Z_RES_P(result));
@@ -5787,7 +5787,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name,
con
}
convert_to_boolean(is_enum);
- if (Z_LVAL_P(is_enum)) {
+ if (Z_TYPE_P(is_enum) == IS_TRUE) {
/* enums need to be treated like strings */
data_type = PG_TEXT;
} else {