WordPress 3.5: Fixing Sharebar PHP Warning: Missing Argument Error


📌 MemberPress: advanced WordPress plugin for subscriptions & membership sites

You should always backup your files and take precautions before upgrading your theme and WordPress files. Your code might break or get warnings after your updates are done. That is what’s happening with a couple of popular WordPress plugins. Sharebar and Redirection are just two popular ones that come to mind. So what should you do if you are getting the following PHP warning? You could always do some code fixing yourself.

Andrew Nacin has written a great piece on how to fix such issues and why you may be getting warnings on your website. While I disagree with turning warnings off, I do agree with the security issues discussed in that article. You don’t necessarily have to wait for your favorite plugin developer to update his/her code though. There are things you can do to fix the issues with Sharebar and Redirection right away.

As far as Sharebar goes, you will have to edit Sharebar.php and Sharebar-admin.php. I have already modified these files, so you can download them right here:

Of course, this solution would not be possible without the help of the WordPress community. e3mobile was kind enough to share this solution, and I just modified it a bit to get rid of the errors in the back-end (sharebar-admin.php). You should still contact your favorite developers and let them know you are getting these errors, so they push the right updates to everyone.

This should be a lesson learned for developers though. Just because your code works does not mean it is completely secure. But thanks to folks such as Andrew Nacin, these errors and security issues won’t go unnoticed. The great community behind WordPress is one of many benefits of using this content management system.

Are you getting plugin warnings after upgrading to WordPress 3.5? Please share.

More WordPress reading: