mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Updated calls to php_trim() to provide arg for returned string type
This commit is contained in:
parent
c1b8eda121
commit
bc87019a80
2 changed files with 3 additions and 3 deletions
|
@ -337,7 +337,7 @@ static void sxe_prop_dim_write(zval *object, zval *member, zval *value, zend_boo
|
|||
trim_zv = *member;
|
||||
zval_copy_ctor(&trim_zv);
|
||||
convert_to_string(&trim_zv);
|
||||
php_trim(Z_STRVAL(trim_zv), Z_STRLEN(trim_zv), NULL, 0, &tmp_zv, 3 TSRMLS_CC);
|
||||
php_trim(Z_STRVAL(trim_zv), Z_STRLEN(trim_zv), NULL, 0, IS_STRING, &tmp_zv, 3 TSRMLS_CC);
|
||||
zval_dtor(&trim_zv);
|
||||
member = &tmp_zv;
|
||||
}
|
||||
|
|
|
@ -265,7 +265,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
|
|||
Z_STRLEN_PP(tmpzval)) {
|
||||
/* Remove newlines and spaces from start and end,
|
||||
php_trim will estrndup() */
|
||||
tmp = php_trim(Z_STRVAL_PP(tmpzval), Z_STRLEN_PP(tmpzval), NULL, 0, NULL, 3 TSRMLS_CC);
|
||||
tmp = php_trim(Z_STRVAL_PP(tmpzval), Z_STRLEN_PP(tmpzval), NULL, 0, IS_STRING, NULL, 3 TSRMLS_CC);
|
||||
if (strlen(tmp) > 0) {
|
||||
if (!header_init) { /* Remove post headers for redirects */
|
||||
int l = strlen(tmp);
|
||||
|
@ -291,7 +291,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
|
|||
}
|
||||
}
|
||||
efree(tmp_c);
|
||||
tmp_c = php_trim(tmp, strlen(tmp), NULL, 0, NULL, 3 TSRMLS_CC);
|
||||
tmp_c = php_trim(tmp, strlen(tmp), NULL, 0, IS_STRING, NULL, 3 TSRMLS_CC);
|
||||
efree(tmp);
|
||||
tmp = tmp_c;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue