WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 22 months ago

#15737 closed defect (bug) (fixed)

Blogger Importer notices

Reported by: joostdevalk Owned by: joostdevalk
Milestone: WordPress.org Priority: normal
Severity: normal Version: 3.1
Component: Import Keywords: has-patch dev-feedback
Focuses: Cc:

Description

I ran the Blogger Importer today on a blog with WP_DEBUG on and encountered too many notices, so I fixed them. Patch coming

Attachments (1)

blogger-importer.patch (2.5 KB) - added by joostdevalk 3 years ago.
Patch

Download all attachments as: .zip

Change History (4)

joostdevalk3 years ago

Patch

comment:1 nacin3 years ago

  • Milestone changed from Awaiting Review to WordPress.org

comment:2 Workshopshed2 years ago

Hi Joost,
I've got a working version of the importer based on Otto's OAuth fork. I also spotted the notices about unassigned variables.

I'm trying to understand part of your patch, I've changed get_user_options function to use get_users as follows.

function get_user_options($current) {
global $importer_users;
if ( ! isset( $importer_users ) )
        $importer_users = (array) get_users();  //Function: get_users_of_blog() Deprecated in version 3.1. Use get_users() instead.

        $options = '';

	foreach ( $importer_users as $user ) {
		$sel = ( $user->ID == $current ) ? " selected='selected'" : '';
		$options .= "<option value='$user->ID'$sel>$user->display_name</option>";
	}
	return $options;
}

You've also change $user->ID to $user->data->ID, is that still relavent now that the function has been swapped out?

comment:3 Otto4222 months ago

  • Resolution set to fixed
  • Status changed from new to closed

With all the changes in 0.5, this patch should no longer be relevant. However, if there's any continuing notice issues, feel free to make a new ticket about it.

Note: See TracTickets for help on using tickets.