Check for no links returned stops error

git-svn-id: http://svn.automattic.com/wordpress/trunk@151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
mikelittle 2003-06-03 22:42:13 +00:00
parent 6a80aa6395
commit 73c4f8cfad
1 changed files with 16 additions and 14 deletions

View File

@ -453,6 +453,7 @@ switch ($action) {
// echo "$sql";
$links = $wpdb->get_results($sql);
if ($links) {
foreach ($links as $link) {
$short_url = str_replace('http://', '', $link->link_url);
$short_url = str_replace('www.', '', $short_url);
@ -466,7 +467,7 @@ switch ($action) {
$visible = ($link->link_visible == 'Y') ? 'Yes' : 'No';
++$i;
$style = ($i % 2) ? ' class="alternate"' : '';
echo <<<LINKS
echo <<<LINKS
<tr valign="middle"$style>
<td><strong>$link->link_name</strong><br />
Description: $link->link_description</td>
@ -480,6 +481,7 @@ echo <<<LINKS
</tr>
LINKS;
}
}
?>
</table>
</form>