summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-01-20 10:34:17 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-01-20 10:34:17 +0100
commit68112224221d47169c69ea353beeb73c58ebbe3a (patch)
tree6df6967fd6e3641706b14146f741c771e258ca21 /ext/pgsql/pgsql.c
parent5947437d47cc3bf8f289e52e6361fccad4b08ae3 (diff)
downloadphp-git-68112224221d47169c69ea353beeb73c58ebbe3a.tar.gz
Eliminate uses of ZVAL_ZVAL and friends
Instead add RETURN_COPY(_VALUE) macros will the expected behavior. RETURN_ZVAL doesn't make any sense since PHP 7, but has stuck around, probably because the alternative was to write directly to the return_value variable.
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r--ext/pgsql/pgsql.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index c92a1ffaa5..9450bf0f61 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -2337,14 +2337,14 @@ PHP_FUNCTION(pg_last_notice)
if ((notice = zend_hash_get_current_data(Z_ARRVAL_P(notices))) == NULL) {
RETURN_EMPTY_STRING();
}
- RETURN_ZVAL(notice, 1, 0);
+ RETURN_COPY(notice);
} else {
RETURN_EMPTY_STRING();
}
break;
case PGSQL_NOTICE_ALL:
if (notices) {
- RETURN_ZVAL(notices, 1, 0);
+ RETURN_COPY(notices);
} else {
array_init(return_value);
return;