Support » Plugins » [Plugin: Delete Duplicate Posts] Invalid argument supplied for foreach() on line 93

  • delete-duplicate-posts Version 1.3.1

    Warning: Invalid argument supplied for foreach() in /…/wp-content/plugins/delete-duplicate-posts/delete-duplicate-posts.php on line 93

    Line 93: foreach ( $custom_field_keys as $key => $value ) {

    if ($postid<>''){
    
    					$custom_field_keys = get_post_custom_keys($postid);
    					foreach ( $custom_field_keys as $key => $value ) {
    				//		$valuet = trim($value);
    				//		if ( '_' == $valuet{0} )
    				//		continue;
    						delete_post_meta($postid, $key, '');
    						$resultnote .= "-- Post META key '". $key . "' value ('$value') deleted! <br />";
    					}
    
    					$result = wp_delete_post($postid);
    					if (!$result) {
    						$resultnote .= "!! Problem deleting post $postid - $perma !!<br />";
    					}
    					else {
    						$resultnote .= "'$title' (ID #$postid) Deleted!<br />";
    
    						$dispcount++;
    					}
    				}

    http://wordpress.org/extend/plugins/delete-duplicate-posts/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I am having the same issue. When I go to delete the posts, it seems to work, but takes a long time and I get a long list of this error message:

    “Warning: Invalid argument supplied for foreach() in … wp-content/plugins/delete-duplicate-posts/delete-duplicate-posts.php on line 316”

    I am running WordPress MU v3.0.1 w/ BuddyPress.

    I haven’t tested the cron functionality yet. I am most interested to see if it works with the posts that are auto-created with [Plugin:WP-o-Matic].

    If there is a more efficient version of [Plugin: Delete Duplicate Posts], or if the developer wants to update it to be more compatible with newer WP versions, that would be great.

    I would be even more interested in an update for [Plugin:WP-o-Matic] to prevent it from creating duplicate posts in the first place. After all, the use of [Plugin: Delete Duplicate Posts] is just a hack to correct the [Plugin:WP-o-Matic] problem.

    +1

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Delete Duplicate Posts] Invalid argument supplied for foreach() on line 93’ is closed to new replies.