Changeset 14644


Ignore:
Timestamp:
04/19/12 20:58:28 (13 months ago)
Author:
GeorgeClark
Message:

Item11780: ASSERT if expandCommon called in init

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Release01x01/core/lib/Foswiki/Func.pm

    r14497 r14644  
    24822482See also: expandVariablesOnTopicCreation 
    24832483 
     2484*Caution:* This function needs all the installed plugins to have gone through initialization. 
     2485Never call this function from within an initPlugin handler,  bad things happen. 
     2486 
    24842487=cut 
    24852488 
     
    24872490    my ( $text, $topic, $web, $meta ) = @_; 
    24882491    ASSERT($Foswiki::Plugins::SESSION) if DEBUG; 
     2492 
     2493    if (DEBUG) { 
     2494        for ( my $i = 4 ; $i <= 7 ; $i++ ) { 
     2495            ASSERT( 0, "expandCommonVariables called during registration" ) 
     2496              if ( ( caller($i) )[3] eq 'Foswiki::Plugin::registerHandlers' ); 
     2497        } 
     2498    } 
     2499 
    24892500    ( $web, $topic ) = _validateWTA( 
    24902501        $web   || $Foswiki::Plugins::SESSION->{webName}, 
Note: See TracChangeset for help on using the changeset viewer.