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";
|
// 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>
|
||||||
|
|
Loading…
Reference in New Issue