Closed (fixed)
Project:
Webform
Version:
7.x-3.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Feb 2012 at 18:21 UTC
Updated:
29 Jun 2013 at 22:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
quicksketchIn Drupal 7, the preferred approach is to use a drupal_static() call, which will allow you to reset a variable without adding an additional parameter to the function. See http://api.drupal.org/drupal_static. If you're interested in writing patch I'd be happy to review it.
I'm moving this to minor because it doesn't affect normal functionality of the module.
Comment #2
isampo commentedHi!
I'm working on Webform Mass Email and also bumped on this when trying to use the _webform_filter_values function.
Here's a patch for Webform that converts the replacement values to use drupal_static. I don't really know where other places _webform_filter_values() is used, so I couldn't test that much. To me this approach worked and I was able to reset the variable using drupal_static_reset('_webform_filter_values'). Is this the right way? Thanks!
Comment #3
quicksketchThanks, great idea. I'll apply this next pass through the queue.
Comment #4
quicksketchThanks, committed to 7.x-3.x branch. This isn't necessary in the 4.x branch because it uses the D7 token system.
Comment #5.0
(not verified) commentedReason->problem