• I’m not sure what is happening, as I did a test run a month or so ago, and I even used different URL, so I had to update a little data in database and in .htacess file, etc., and all looked ok, except a few pieces of content were off.

    Now that I did it with the actual same URL, just moving to new server, I’m getting this error.

    I can’t understand the error, because the path it shows is odd.

    This is error.

    Warning: Illegal offset type in /home/content/02/10854302/html/wp-content/plugins/contact-form-7/includes/shortcodes.php on line 15

    Warning: Illegal offset type in /home/content/02/10854302/html/wp-content/plugins/contact-form-7/includes/shortcodes.php on line 15

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/02/10854302/html/wp-content/plugins/contact-form-7/includes/shortcodes.php:15) in /home/content/02/10854302/html/

    Any suggestions out there?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I was getting a similar error message when I updated Contact Form 7 to version 3.4.2. Replacing the add_shortcode function in wp-content/plugins/contact-form-7/includes/shortcodes.php from this:

    function add_shortcode( $tag, $func, $has_name = false ) {
        if ( is_callable( $func ) )
            $this->shortcode_tags[$tag] = array(
                'function' => $func,
                'has_name' => (boolean) $has_name );
    }

    …to this:

    function add_shortcode( $tag, $func, $has_name = false ) {
        if ( ! is_callable( $func ) )
            return;
    
        $tags = array_filter( array_unique( (array) $tag ) );
    
        foreach ( $tags as $tag ) {
            $this->shortcode_tags[$tag] = array(
                'function' => $func,
                'has_name' => (boolean) $has_name );
        }
    }

    …seemed to work for me. I think it has something to do with a change in PHP 5.4 and how it handles $this.

    This worked for me thanks! Hopefully Contact Form 7 sorts this out…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need help, have error(s) after moving site from another server’ is closed to new replies.