Check for no links returned stops error
git-svn-id: https://develop.svn.wordpress.org/trunk@151 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4ad431f22e
commit
e22a0e803a
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue