Code Inspection: Ternary expression can be replaced with condition (#728)

This commit is contained in:
Roman Kelesidis 2023-05-29 00:32:36 +07:00 committed by GitHub
commit de076c80ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 29 additions and 29 deletions

View file

@ -46,7 +46,7 @@ function attachment_quota_settings($admin_mode, $mode, $submit = false)
if ($admin_mode == 'user') {
// We overwrite submit here... to be sure
$submit = (isset($_POST['submit'])) ? true : false;
$submit = isset($_POST['submit']);
if (!$submit && $mode != 'save') {
$user_id = get_var(POST_USERS_URL, 0);

View file

@ -79,7 +79,7 @@ function get_supported_image_types($type)
}
return array(
'gd' => ($new_type) ? true : false,
'gd' => (bool)$new_type,
'format' => $new_type,
'version' => (function_exists('imagecreatetruecolor')) ? 2 : 1
);