zinga, mybb 1.6.5 will affect some of your plugins
MattR Offline
Junior Member
**
Posts: 40
Joined: Jul 2010
Post: #9
RE: zinga, mybb 1.6.5 will affect some of your plugins
(11-19-2011 11:16 PM)ZiNgA BuRgA Wrote:  
(11-19-2011 09:42 PM)MattR Wrote:  The changes are incredibly minor and only affect a select list of hooks. Some functions will require a & to be placed before the variable that's passed to the function, and some require you to add return $var; to the end of the function, where $var is the value that's passed to the function (in fact it's actually possible to use the & method for all the changes).
I generally declare functions with an argument reference when I need it, as it makes sense to have it there IMO.
Do you have to return something in most cases?  I would presume if nothing is returned (ie null), the system should just ignore it...  I'll check when I can be bothered.
If the ref was converted into a required return, then that would be a problem.

Also would need to check whether the changes will still allow backwards compatibility as I still support MyBB 1.4.  There's probably a workaround regardless.

I don't think so; there's a list that need to receive by ref and a list that need to return (things like the admin_config_permissions hook that returns the permissions array) but apparently all of the affected hooks can just receive by reference. And yeah, the same changes will work fine on 1.4; it's just that currently it passes by reference but has to receive by reference, it's still ends up being a reference either way, so 1.4 and older versions of 1.6 can use the same code as 1.6.5 plugins.

(11-19-2011 11:16 PM)ZiNgA BuRgA Wrote:  
(11-19-2011 09:42 PM)MattR Wrote:  call time pass by reference was deprecated in PHP 5.3, and as more hosts are upgrading to it, the change needs to be made, because otherwise you'll get errors on your forum and people will still complain.
Not really, I believe it only errors if you enable deprecated warnings, but MyBB disables it.  Calling with a reference works fine in 5.3, whether it will or not in 5.4 is another thing though.

Some people have had errors on 1.6 with PHP 5.3, but yeah, if it's deprecated in 5.3 I think it's removed in 5.4, which is in beta, so it won't be too long before it's released and hosts upgrade to it. Then there definitely will be errors or things will just silently break.

(11-19-2011 11:16 PM)ZiNgA BuRgA Wrote:  
(11-19-2011 09:42 PM)MattR Wrote:  I have 15 plugins and it took me under an hour to compile a list of the lines that need changing and then to make the changes. It's not like you're going to have to rewrite all your plugins.
Yeah it's probably easy if you know what you're looking for.  For those that aren't being maintained, it could be more difficult.
Then again, every new MyBB version has the potential to break plugins (though this one's a bit more fundamental) so meh.
[/quote]

If people are unsure on what to do they can post in the plugins forum on mybb.com; assuming active plugins get upgraded, you've just got to look into unmaintained ones, and they may already have the required change in them.
(This post was last modified: 11-21-2011 01:05 AM by MattR.)
11-21-2011 01:04 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: zinga, mybb 1.6.5 will affect some of your plugins - MattR - 11-21-2011 01:04 AM

 Standard Tools
Forum Jump: