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);
    }
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SocialNicheGuru’s picture

what happens if you make this change? how does it affect the functionality?

rbrandon’s picture

It does not affect funtionality, it operates the same as before

rbrandon’s picture

There is actually one other place where this happens:

Line 209 spaces.module

$access = $access && call_user_func(array($info['class'], 'menu_access'), $op, $object, FALSE);

Should be replaced with

    $space = new $info['class']($type);
    $access = $access && $space->menu_access($op, $object, false);

This also does not affect functionality just corrects inappropriate the static call.

rbrandon’s picture

FileSize
907 bytes

Here is a patch if that helps.

rbrandon’s picture

FileSize
914 bytes

I left off the last parameter in the route function I re_created the patch and it is attached.

Cheers,
Richard

jmiccolis’s picture

Status: Active » Closed (won't fix)

The 2.x branch is no longer supported; setting this to "won't fix".

dergachev’s picture

Issue summary: View changes
FileSize
1.02 KB

In 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.