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:
Mike Little 2003-06-03 22:42:13 +00:00
parent 4ad431f22e
commit e22a0e803a
1 changed files with 16 additions and 14 deletions

View File

@ -453,6 +453,7 @@ switch ($action) {
// echo "$sql"; // echo "$sql";
$links = $wpdb->get_results($sql); $links = $wpdb->get_results($sql);
if ($links) {
foreach ($links as $link) { foreach ($links as $link) {
$short_url = str_replace('http://', '', $link->link_url); $short_url = str_replace('http://', '', $link->link_url);
$short_url = str_replace('www.', '', $short_url); $short_url = str_replace('www.', '', $short_url);
@ -480,6 +481,7 @@ echo <<<LINKS
</tr> </tr>
LINKS; LINKS;
} }
}
?> ?>
</table> </table>
</form> </form>