class-oembed Error

PHP Fatal error: Cannot redeclare _wp_oembed_get_object() (previously declared in /home/samdonme/public_html/wp-includes/embed.php:112) in /home/samdonme/public_html/wp-includes/class-oembed.php on line 692

embed.php:112

function _wp_oembed_get_object() {
    static $wp_oembed = null;

oembed.php on line 692

function _wp_oembed_get_object() {
    static $wp_oembed = null;

    if ( is_null( $wp_oembed ) ) {
        $wp_oembed = new WP_oEmbed();
    }
    return $wp_oembed;

As you see above, I am have problem with the embed.php and class-oembed.php. When I delete form setting.php

require( ABSPATH . WPINC . '/class-oembed.php' );

problem is fixed. But I want to learn how can I fix "_wp_oembed_get_object()" problem

Topic oembed Wordpress

Category Web


The function _wp_oembed_get_object was moved from class-oembed.php to embed.php a while back - your best bet is to reinstall WordPress.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.