mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
Eliminate useless separations
This commit is contained in:
parent
ffa16693a7
commit
20b13fda09
@ -379,10 +379,6 @@ static void php_zval_filter(zval *value, zend_long filter, zend_long flags, zval
|
|||||||
filter_func = php_find_filter(FILTER_DEFAULT);
|
filter_func = php_find_filter(FILTER_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (copy) {
|
|
||||||
SEPARATE_ZVAL(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* #49274, fatal error with object without a toString method
|
/* #49274, fatal error with object without a toString method
|
||||||
Fails nicely instead of getting a recovarable fatal error. */
|
Fails nicely instead of getting a recovarable fatal error. */
|
||||||
if (Z_TYPE_P(value) == IS_OBJECT) {
|
if (Z_TYPE_P(value) == IS_OBJECT) {
|
||||||
@ -634,9 +630,6 @@ static void php_filter_call(zval *filtered, zend_long filter, zval *filter_args,
|
|||||||
|
|
||||||
if (Z_TYPE_P(filtered) == IS_ARRAY) {
|
if (Z_TYPE_P(filtered) == IS_ARRAY) {
|
||||||
if (filter_flags & FILTER_REQUIRE_SCALAR) {
|
if (filter_flags & FILTER_REQUIRE_SCALAR) {
|
||||||
if (copy) {
|
|
||||||
SEPARATE_ZVAL(filtered);
|
|
||||||
}
|
|
||||||
zval_ptr_dtor(filtered);
|
zval_ptr_dtor(filtered);
|
||||||
if (filter_flags & FILTER_NULL_ON_FAILURE) {
|
if (filter_flags & FILTER_NULL_ON_FAILURE) {
|
||||||
ZVAL_NULL(filtered);
|
ZVAL_NULL(filtered);
|
||||||
@ -649,9 +642,6 @@ static void php_filter_call(zval *filtered, zend_long filter, zval *filter_args,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (filter_flags & FILTER_REQUIRE_ARRAY) {
|
if (filter_flags & FILTER_REQUIRE_ARRAY) {
|
||||||
if (copy) {
|
|
||||||
SEPARATE_ZVAL(filtered);
|
|
||||||
}
|
|
||||||
zval_ptr_dtor(filtered);
|
zval_ptr_dtor(filtered);
|
||||||
if (filter_flags & FILTER_NULL_ON_FAILURE) {
|
if (filter_flags & FILTER_NULL_ON_FAILURE) {
|
||||||
ZVAL_NULL(filtered);
|
ZVAL_NULL(filtered);
|
||||||
|
Loading…
Reference in New Issue
Block a user