Fix errors when bulk actions executed on empty list, props nacin, see #11184

git-svn-id: https://develop.svn.wordpress.org/trunk@12317 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2009-12-03 01:43:49 +00:00
parent 65e6d5fb10
commit 07f2fd2e4b
8 changed files with 40 additions and 23 deletions
+3 -2
View File
@@ -18,13 +18,14 @@ if ( isset($_GET['action']) && isset($_GET['linkcheck']) ) {
wp_die( __('You do not have sufficient permissions to edit the links for this blog.') );
if ( 'delete' == $doaction ) {
foreach ( (array) $_GET['linkcheck'] as $link_id ) {
$bulklinks = (array) $_GET['linkcheck'];
foreach ( $bulklinks as $link_id ) {
$link_id = (int) $link_id;
wp_delete_link($link_id);
}
wp_redirect( wp_get_referer() );
wp_safe_redirect( wp_get_referer() );
exit;
}
} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {