Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The spaces_router function has the following lines,
// Run each non-active space type's router
foreach ($types as $type => $info) {
call_user_func(array($info['class'], 'router'), $op, $object, FALSE);
}
You can see that it calls the router function as if it was static spaces_og::router
The code should be refactored as:
// Run each non-active space type's router
foreach ($types as $type => $info) {
$space = new $info['class']($type);
$space->router($op, $object);
}
Comment | File | Size | Author |
---|---|---|---|
#7 | 657330.spaces-php55-errors.patch | 1.02 KB | dergachev |
#5 | spaces.static_call_fix.patch | 914 bytes | rbrandon |
#4 | spaces.static_call_fix.patch | 907 bytes | rbrandon |
Comments
Comment #1
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedwhat happens if you make this change? how does it affect the functionality?
Comment #2
rbrandon CreditAttribution: rbrandon commentedIt does not affect funtionality, it operates the same as before
Comment #3
rbrandon CreditAttribution: rbrandon commentedThere is actually one other place where this happens:
Line 209 spaces.module
Should be replaced with
This also does not affect functionality just corrects inappropriate the static call.
Comment #4
rbrandon CreditAttribution: rbrandon commentedHere is a patch if that helps.
Comment #5
rbrandon CreditAttribution: rbrandon commentedI left off the last parameter in the route function I re_created the patch and it is attached.
Cheers,
Richard
Comment #6
jmiccolis CreditAttribution: jmiccolis commentedThe 2.x branch is no longer supported; setting this to "won't fix".
Comment #7
dergachev CreditAttribution: dergachev commentedIn case any other poor souls are still on spaces 1.x (or 2.x), the attached patch (againt 1.x) is identical to one in a previous comment but actually fixes the bug for me.