Skip to content

Commit

Permalink
If empty ($links[$i]) then $names[$i] also empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce Bannon committed Nov 27, 2024
1 parent 0b9faa2 commit 54d9443
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions adminhome.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,10 @@
<table>';

for ( $i = 0, $cnt = count( $names ); $i < $cnt; $i++ ) {
$empLink = empty( $links[$i] );
echo ( $i % COLUMNS == 0 ? '
echo ( $i % COLUMNS === 0 ? '
<tr>' : '' ) . '
<td>' . ( $empLink ? '' : '<a href="' . $links[$i] . '">' )
. $names[$i] . ( $empLink ? '' : '</a>' ) . '</td>'
. ( $i % COLUMNS == COLUMNS - 1 ? '
<td><a href="' . $links[$i] . '">'. $names[$i] . '</a></td>' .
( $i % COLUMNS === COLUMNS - 1 ? '
</tr>' : '' );
}

Expand Down

0 comments on commit 54d9443

Please sign in to comment.