uoregon / WPSpin

A WordPress plugin providing integration with Spinitron's SpinPAPI API service.
GNU General Public License v2.0
3 stars 5 forks source link

WPSpin PlayList widget warning message #10

Closed sdunham closed 11 years ago

sdunham commented 11 years ago

I'm getting a warning message when I add the WPSpin PlayList widget to a widget area. Here's the warning message text:

Warning: Missing argument 2 for WPSpin\PlaylistWidgetView::form(), called in /path/to/wordpress/wp-includes/widgets.php on line 270 and defined in /path/to/wordpress/wp-content/plugins/WPSpin/viewmodels/playlistwidgetview.php on line 31

wpspin_warning

Word of warning: I don't fully understand how this second parameter is being used so I don't know what other ramifications this change might have. Feel free to reject if this is the wrong way to address the issue!

Also, if you don't already have plans to do this, I was going to look into making it so the user can specify the number of plays to be displayed.

mtomcal commented 11 years ago

@sdunham Thanks for submitting the pull request. After consulting http://codex.wordpress.org/Widgets_API, I found that the form method takes one argument, $instance and the update method takes the $new_instance and $old_instance args. I must have made a mistake when implementing them. I went and fixed this to have the appropriate args so this pull request is unnescessary. Thanks for bringing this bug up.