https://bugzilla.wikimedia.org/show_bug.cgi?id=66706

            Bug ID: 66706
           Summary: Depricated preg_replace(): The /e modifier is
                    deprecated in HTMLets
           Product: MediaWiki extensions
           Version: REL1_22 branch
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: [other]
          Assignee: wikibugs-l@lists.wikimedia.org
          Reporter: felipe.dj...@gmail.com
       Web browser: ---
   Mobile Platform: ---

When using the HTMLets extension with PHP 5.5.13 you get the following warning:
"Depricated preg_replace(): The /e modifier is deprecated, use
preg_replace_callback() instead"

Not sure if the code is correct but replacing the function
wfRenderHTMLetHackPostProcess in HTMLets.php starting on line 134 with the
below code solves the problem. Not sure if the code is correct. Code taken from
https://www.mediawiki.org/wiki/Extension_talk:HTMLets#Deprecated:_preg_replace.28.29:_The_.2Fe_modifier_is_deprecated.2C_use_preg_replace_callback_instead_30458



function wfRenderHTMLetHackPostProcess( $parser, &$text ) {
    $text = preg_replace_callback(
        '/<!-- @HTMLetsHACK@ ([0-9a-zA-Z\\+\\/]+=*) @HTMLetsHACK@ -->/sm',
        function ($m) {
            return base64_decode("$m[1]");
        },
        $text
    );

    return true;
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to