Skip to content

Commit

Permalink
Item13257: Document risk of recursion with expandCommonVariables
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Feb 19, 2015
1 parent 908c6b4 commit ae6b604
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/lib/Foswiki/Func.pm
Expand Up @@ -2607,6 +2607,16 @@ See also: expandVariablesOnTopicCreation
*Caution:* This function needs all the installed plugins to have gone through initialization.
Never call this function from within an initPlugin handler, bad things happen.
*Caution:* This function ultimately calls the following handlers:
* =beforeCommonTagsHandler=
* =commonTagsHandler=
* =registered macro handlers=
* =afterCommonTagsHandler=
%X% *It is possible to create an infinite loop if expandCommonVariables is called in any of these handlers.*
It can be used, but care should be taken to ensure that the text being expanded does
not cause this function to be called recursively.
=cut

sub expandCommonVariables {
Expand Down

0 comments on commit ae6b604

Please sign in to comment.