File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -3269,16 +3269,11 @@ PHP_FUNCTION(pg_copy_from)
3269
3269
int command_failed = 0 ;
3270
3270
PQclear (pgsql_result );
3271
3271
ZEND_HASH_FOREACH_VAL (Z_ARRVAL_P (pg_rows ), value ) {
3272
- zend_string * zquery = NULL ;
3273
3272
zend_string * tmp = zval_try_get_string (value );
3274
3273
if (UNEXPECTED (!tmp )) {
3275
3274
return ;
3276
3275
}
3277
- zquery = zend_string_alloc (ZSTR_LEN (tmp ) + 2 , false);
3278
- if (UNEXPECTED (!zquery )) {
3279
- zend_string_release (tmp );
3280
- return ;
3281
- }
3276
+ zend_string * zquery = zend_string_alloc (ZSTR_LEN (tmp ) + 2 , false);
3282
3277
memcpy (ZSTR_VAL (zquery ), ZSTR_VAL (tmp ), ZSTR_LEN (tmp ) + 2 );
3283
3278
ZSTR_VAL (zquery )[ZSTR_LEN (tmp ) + 1 ] = 0 ;
3284
3279
if (ZSTR_LEN (zquery ) > 0 && ZSTR_VAL (zquery )[ZSTR_LEN (tmp )] != '\n' ) {
You can’t perform that action at this time.
0 commit comments