Problem/Motivation
There is a rare problem in the radioactivity_node.module call to hook_nodeapi associated with the recent feature addition that allows privileged users to edit a node's energy level. Normally, on a node form the energy values are stored in $node->radioactivity_node array, which is then parsed by a foreach loop (line 159) when the node is saved. However, if a module loads and saves a node, the $node->radioactivity_node is not present (as it is only added on the node forms) and the foreach loop throws an error as a result.
Proposed resolution
Because $node->radioactivity_node is intended to store user edits to node energy I propose adding a check for $node->radioactivity_node prior to running the foreach loop. Modules that need to edit a node's energy can take a different approach.
I have attached a patch with the proposed solution.
| Comment | File | Size | Author |
|---|---|---|---|
| radioactivity_node.patch | 483 bytes | mrwendell |
Comments
Comment #1
kevinchampion commentedI can confirm this bug and confirm that the patch resolves the error.
Comment #1.0
kevinchampion commentedsilly grammer mistakes
Comment #2
sutharsan commentedIssue triage: Closing issue, the 6.x branch is no longer maintained.
If you believe this issue is closed in error, feel free to re-open.