Needs review
Project:
Spaces
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Feb 2012 at 07:41 UTC
Updated:
15 Aug 2012 at 13:51 UTC
Jump to comment: Most recent file
Notice: Undefined property: stdClass::$purl in _spaces_taxonomy_term_save_preset_and_modifier() (line 199 of spaces/spaces_taxonomy/spaces_taxonomy.module).
got this once I enabled the module
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1457458-1-spaces-taxonomy-purl-undefined-property.patch | 672 bytes | mr.baileys |
Comments
Comment #1
mr.baileysConfirmed with a current version of HEAD. The bug is triggered when Spaces Taxonomy is enabled and a new taxonomy term is created before setting the Spaces taxonomy via Structure > Spaces > Taxonomy.
The bug is caused by the following snippet in
_spaces_taxonomy_term_save_preset_and_modifier:When
spaces_taxonomy_machine_nameis not set, it defaults to integer 0. Comparing the machine name of the term being saved (always a string, for example 'spaces') with integer zero forces PHP to convert the machine name to a number (String conversion to numbers) prior to comparing. In most cases, this conversion will yield 0, and Spaces Taxonomy will incorrectly treat the term being saved as a spaces term.Patch attached with an easy fix (don't use a default for 'spaces_taxonomy_machine_name', causing it to be NULL if no vocabulary has been assigned to Spaces Taxonomy).