• Resolved John Donovan

    (@johndonovan)


    The current version of the plugin returns a fatal error when attempting to Activate on installation or upgrade.

    The error log reports:

    PHP Parse error: syntax error, unexpected ‘)’ in public_html/wp-content/plugins/clone-posts/admin/class-clone-posts-admin.php on line 160

    The problem appears to be a trailing comma in line 159:

    register_setting(
    			'clone_post_settings',
    			'clone_posts_post_type',
    			[$this,'clonePosts_sanitize_array'],
    		);

    Removing the trailing comma resolves the issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I just came here to report this bug as well. To provide additional info, a trailing comma in the function call arguments became a legitimate syntax in PHP 7.3 but caused a fatal error in earlier versions.

    Plugin Author George Pattichis

    (@pattihis)

    You are right, that trailing comma causes a fatal error in earlier versions of PHP. I have just uploaded an update with the fix for backwards compatibility.

    @johndonovan , @deltafactory thank you for reporting this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal Error on Activation’ is closed to new replies.