Closed (fixed)
Project:
Spaces
Version:
6.x-3.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Sep 2011 at 16:31 UTC
Updated:
25 Jan 2012 at 19:46 UTC
Jump to comment: Most recent file
Hello, I just wanted to report that I am getting this error message on a fresh install of Drupal.
Notice: Undefined variable: type in spaces_init() (line 810 of /home/quickstart/websites/cmf.dev/profiles/cmfspaces/modules/contrib/spaces/spaces.module).
I think it can be easily fixed by changing line 810
// If the space is incorrect, reroute.
if ($type && !spaces_is_spaces_object($type, $object)) {
spaces_router($type, $object);
}
to
// If the space is incorrect, reroute.
if (isset($type) && !spaces_is_spaces_object($type, $object)) {
spaces_router($type, $object);
}
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | spaces_overrides-check_id_exists-1279218-7.patch | 749 bytes | dellintosh |
| #5 | spaces-type-isset-1279218-5.patch | 406 bytes | dellintosh |
Comments
Comment #1
markwk commentedSimilar issue popping up for me. Spaces is an awfully complicated beast so love to hear a maintainer comment on this one before add...
Comment #2
fuzzy76 commentedI'm seeing this too, both on page loads and on drush invocations.
Comment #3
fuzzy76 commentedBy looking at the code (this happens right before $type is references), I am wondering if both if's fails to trigger. In that case, $type will not be defined at all. Unfortunately, I don't understand the code good enough to propose a solution. The other alternative is that the foreach doesn't get anything to iterate through.
Comment #4
Grayside commentedI think #0 in the form of a patch is the right way to go.
Comment #5
dellintosh commentedPatch attached.
Have a great day!
-dellintosh
Comment #6
Grayside commentedComment #7
dellintosh commentedsimilar to the above, we should probably be checking for the existence of the 'buttons' key in the $form array too.
Patch for that is attached below.
Comment #8
Grayside commentedIf it's the same issue, there is one patch. Otherwise, two issues please.
Comment #9
patricksettle commentedReviewed #5 checks out and has been committed
Commit 9472223 on 6.x-3.x