mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
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.
This commit is contained in:
parent
5947437d47
commit
6811222422
10 changed files with 20 additions and 29 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue