Closed (fixed)
Project:
Select (or other)
Version:
7.x-3.x-dev
Component:
CCK / Field API widget
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Aug 2012 at 17:29 UTC
Updated:
20 Jun 2013 at 03:50 UTC
I created a beguiling bug because my allowed_options_php code used a variable, natural to the problem domain, of "$options".
... woops.
Would be better if the eval happened in a different scope and tried to avoid collisions.
patch suggests a way to do it. includes handling of (non-php) allowed options for code-clarity.
Comments
Comment #1
haydeniv commentedIssues with patches should be Needs review or Needs work so they are easier to locate in the issue queue.
Although convenient, storing PHP code in the database is very dangerous just like you have found and can quickly trash your site where you have to edit the database directly to fix it. I'm actually considering removing that option all together and forcing people to use a custom module with instructions for that feature.
Comment #2
haydeniv commentedWent ahead and applied this: 7220527
Thanks!