• Hi my Contact Form 7 just updated to the new version and crashed my site
    It says…

    Plugin Contact Form 7 triggered a fatal error.

    Parse error: syntax error, unexpected ‘print’ (T_PRINT), expecting identifier (T_STRING) in /wp-content/plugins/contact-form-7/admin/includes/welcome-panel.php on line 9

    I’ve had to disable it
    Any thoughts

    phil

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Which version of PHP do you use?

    Thread Starter haroldstreet

    (@haroldstreet)

    Good question – we are locked into using PHP 7.4 and can not upgrade.
    Is that the issue?

    phil

    I’ve got the same error after latest update. My site is running on PHP v5.6.4 and I can’t upgrade it.
    But looks like the issue is not with the PHP version.
    As I found the problem is triggered by this function definition:

    public function print() {
    		$icon = sprintf(
    			'<span class="dashicons dashicons-%s" aria-hidden="true"></span>',
    			esc_attr( $this->icon() )
    		);
    
    		$title = sprintf(
    			'<h3>%1$s %2$s</h3>',
    			$icon,
    			$this->title()
    		);
    
    		$content = $this->content();
    
    		if ( is_array( $content ) ) {
    			$content = implode( "\n\n", $content );
    		}
    
    		$content = wp_kses_post( $content );
    		$content = wptexturize( $content );
    		$content = convert_chars( $content );
    		$content = wpautop( $content );
    
    		echo "\n";
    		echo '<div class="welcome-panel-column">';
    		echo $title;
    		echo $content;
    		echo '</div>';
    	}

    in welcome-panel.php

    Can you advice anything? Or may be it’s possible to do a downgrade to prev version of CF7 plugin? I would be great if you can give a link to prev version installation…

    PHP 7.2. I have same error after automatically updated CF7 to latest version and can’t login to WP admin area.

    Try to check your admin email. There you can find a link to enter the admin area. Following it you’ll be able to disable CF7 plugin and restore normal admin area functions.

    @vicmogilev I know it, but I don’t ask how to do this. I want to fix plugin error. Ty.

    @ivaseg Sorry, just wanted to help. I’m not CF7 staff and waiting for bug fix too.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Fatal error on latest update’ is closed to new replies.