Skip to content

Commit 85b8b63

Browse files
committed
PHP8: fix unparenthesized ternary operator (#347)
1 parent 8741781 commit 85b8b63

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Source/pages/view.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,16 @@
118118
</select>
119119
<input type="submit" value="<?php echo plugin_lang_get( 'update' ) ?>"/>
120120
<?php } else {
121-
echo $t_changeset->ported == "0" ? plugin_lang_get( 'na' ) : $t_changeset->ported == "" ? plugin_lang_get( 'pending' ) : string_display_line( $t_changeset->ported );
121+
switch( $t_changeset->ported ) {
122+
case '0':
123+
echo plugin_lang_get( 'na' );
124+
break;
125+
case '':
126+
echo plugin_lang_get( 'pending' );
127+
break;
128+
default:
129+
echo string_display_line( $t_changeset->ported );
130+
}
122131
} ?>
123132
</td>
124133
<?php } ?>

0 commit comments

Comments
 (0)