Skip to content

Commit 320a049

Browse files
committed
ext/standard: use RETURN_BOOL() when possible
1 parent 6b31809 commit 320a049

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

ext/standard/basic_functions.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,11 +1341,7 @@ PHP_FUNCTION(error_log)
13411341
Z_PARAM_STR_OR_NULL(headers)
13421342
ZEND_PARSE_PARAMETERS_END();
13431343

1344-
if (_php_error_log((int) erropt, message, opt, headers) == FAILURE) {
1345-
RETURN_FALSE;
1346-
}
1347-
1348-
RETURN_TRUE;
1344+
RETURN_BOOL(_php_error_log((int) erropt, message, opt, headers) == SUCCESS);
13491345
}
13501346
/* }}} */
13511347

@@ -2314,11 +2310,7 @@ PHP_FUNCTION(is_uploaded_file)
23142310
RETURN_FALSE;
23152311
}
23162312

2317-
if (zend_hash_exists(SG(rfc1867_uploaded_files), path)) {
2318-
RETURN_TRUE;
2319-
} else {
2320-
RETURN_FALSE;
2321-
}
2313+
RETURN_BOOL(zend_hash_exists(SG(rfc1867_uploaded_files), path));
23222314
}
23232315
/* }}} */
23242316

0 commit comments

Comments
 (0)