mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
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:
@@ -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']) ) {
|
||||
|
||||
Reference in New Issue
Block a user