Changeset 8899


Ignore:
Timestamp:
09/05/10 08:11:52 (21 months ago)
Author:
MichaelTempest
Message:

Item9514: Perl complained about join()-ing an undef value when opening the WYSIWYG editor. That seems to be because the splitting up of topic and URL params ended up accessing an array element that wasn't there.

I am not sure how to test the case where there are URL params, but I can open the wysiwyg editor again. Please feel free to fix this fix if I broke something :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/POPUPWINDOW.pm

    r8875 r8899  
    6969    if ($topic) { 
    7070        # get query string 
    71         my @urlParts = split(/\?/, $topic); 
    72         $topic = $urlParts[0] if scalar @urlParts; 
    73         push (@queryParts, $urlParts[1]) if scalar @urlParts; 
     71        if ( $topic =~ s/\?(.*)// ) { 
     72            push (@queryParts, $1); 
     73        } 
    7474    } 
    7575     
Note: See TracChangeset for help on using the changeset viewer.