• Resolved formica

    (@formica)


    Just a had a very scary wordpress fatal error:

    “Fatal error: Cannot redeclare automatic_feed_links() (previously declared in…”

    Still don’t know how this happened, and couldn’t find any solutions or other occurrences online so thought I’d post.

    Site was completely down only giving the above error. Was just about to revert to a month old backup but first removed this function from the general-includes.php file and re-uploaded it.

    /**
     * Enable/disable automatic general feed link outputting.
     *
     * @since 2.8.0
     *
     * @param boolean $add Add or remove links. Defaults to true.
     */
    function automatic_feed_links( $add = true ) {
        if ( $add )
            add_action( 'wp_head', 'feed_links', 2 );
        else {
            remove_action( 'wp_head', 'feed_links', 2 );
            remove_action( 'wp_head', 'feed_links_extra', 3 );
        }
    }

    WordPress then worked in a very strange way, throwing up errors, loosing all styling but allowed me to access the updates page where i could re-install my version of wordpress successfully.

    Everythings back to normal – just considering I couldn’t find this error anywhere else, thought i’d share.

The topic ‘Fatal error: Cannot redeclare automatic_feed_links()’ is closed to new replies.