Support » Fixing WordPress » The /e modifier is no longer supported error

  • daan

    (@dhoitink)


    Hi,
    Have searched the forum and found similir problems, but not a real solutions.

    Getting this messing when updating a WP site from PHP5.2 to PHP7.0

    The /e modifier is no longer supported, use preg_replace_callback instead in C:\domains\domeinname.nl\wwwroot\wp-content\themes\dynamic-wnb\functions.php on line 25

    it concens this part;

    function wp_fancybox_replace($the_content) {
        $preg = '/(<a(.*?)href="([^"]*.)(bmp|gif|jpeg|jpg|png)"(.*?)><img)/ie';
          $repl = '(strstr("\2\5","rel=") ? "\1" : "<a\2href=\"\3\4\"\5 class=\"myfancybox\"><img")';
        return preg_replace($preg,$repl,$the_content);
    }

    Could anywone with more PHP skill then me assist in helping me solve this problem?
    The Fancybox part can be deleted (i can replaces this with a simple plugin), but the main content part of course needs some overhaul…

    Thanks in advance!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.