Error
Cannot use object of type stdClass as array Error thrown with message "Cannot use object of type stdClass as array" Stacktrace: #10 Error in /home/aparthot/public_html/wp-content/plugins/milenia-theme-functionality/app/Widgets/TwitterFeedWidget.php:54 #9 TwitterFeedWidget:widget in /home/aparthot/public_html/wp-includes/class-wp-widget.php:393 #8 WP_Widget:display_callback in /home/aparthot/public_html/wp-includes/widgets.php:831 #7 dynamic_sidebar in /home/aparthot/public_html/wp-content/themes/milenia/sidebar.php:19 #6 require_once in /home/aparthot/public_html/wp-includes/template.php:770 #5 load_template in /home/aparthot/public_html/wp-includes/template.php:716 #4 locate_template in /home/aparthot/public_html/wp-includes/general-template.php:136 #3 get_sidebar in /home/aparthot/public_html/wp-content/themes/milenia/page.php:39 #2 include in /home/aparthot/public_html/wp-includes/template-loader.php:106 #1 require_once in /home/aparthot/public_html/wp-blog-header.php:19 #0 require in /home/aparthot/public_html/index.php:17
Stack frames (11)
10
Error
/wp-content/plugins/milenia-theme-functionality/app/Widgets/TwitterFeedWidget.php54
9
TwitterFeedWidget widget
/wp-includes/class-wp-widget.php393
8
WP_Widget display_callback
/wp-includes/widgets.php831
7
dynamic_sidebar
/wp-content/themes/milenia/sidebar.php19
6
require_once
/wp-includes/template.php770
5
load_template
/wp-includes/template.php716
4
locate_template
/wp-includes/general-template.php136
3
get_sidebar
/wp-content/themes/milenia/page.php39
2
include
/wp-includes/template-loader.php106
1
require_once
/wp-blog-header.php19
0
require
/index.php17
/home/aparthot/public_html/wp-content/plugins/milenia-theme-functionality/app/Widgets/TwitterFeedWidget.php
                echo $instance['title'];
            echo $args['after_title'];
 
            if(!empty($tweets_decoded)) :
        ?>
            <!--================ Twitter Feed ================-->
            <ul class="milenia-twitter-feed milenia-list--unstyled">
                <?php foreach($tweets_decoded as $tweet) : ?>
                    <li>
                        <div class="milenia-tweet">
                            <div class="milenia-tweet-content"><?php echo $this->prepareText($tweet); ?></div>
                            <footer class="milenia-tweet-footer"><?php echo $this->prepareDate($tweet); ?></footer>
                        </div>
                    </li>
                <?php endforeach; ?>
            </ul>
            <!--================ End of Twitter Feed ================-->
 
            <?php if(isset($instance['show_follow_button']) && boolval($instance['show_follow_button'])) : ?>
                <a href="https://twitter.com/<?php echo esc_attr($tweets_decoded[0]->user->screen_name); ?>" target="_blank" class="milenia-btn milenia-btn--icon milenia-btn--scheme-primary milenia-btn--link"><span class="fab fa-twitter"></span><?php esc_html_e('Follow Us On Twitter', 'milenia-app-textdomain'); ?></a>
            <?php endif; ?>
        <?php
        endif;
        echo $args['after_widget'];
    }
 
 
    protected function prepareText($tweet)
    {
 
        if(isset($tweet->entities) && isset($tweet->entities->urls))
        {
            foreach($tweet->entities->urls as $url)
            {
                $tweet->text = str_replace($url->url, '<a href="' .$url->expanded_url. '">' . $url->display_url . '</a>', $tweet->text);
            }
        }
 
        if(isset($tweet->entities) && !isset($tweet->entities->hashtags))
        {
/home/aparthot/public_html/wp-includes/class-wp-widget.php
             * Returning false will effectively short-circuit display of the widget.
             *
             * @since 2.8.0
             *
             * @param array     $instance The current widget instance's settings.
             * @param WP_Widget $widget   The current widget instance.
             * @param array     $args     An array of default widget arguments.
             */
            $instance = apply_filters( 'widget_display_callback', $instance, $this, $args );
 
            if ( false === $instance ) {
                return;
            }
 
            $was_cache_addition_suspended = wp_suspend_cache_addition();
            if ( $this->is_preview() && ! $was_cache_addition_suspended ) {
                wp_suspend_cache_addition( true );
            }
 
            $this->widget( $args, $instance );
 
            if ( $this->is_preview() ) {
                wp_suspend_cache_addition( $was_cache_addition_suspended );
            }
        }
    }
 
    /**
     * Handles changed settings (Do NOT override).
     *
     * @since 2.8.0
     *
     * @global array $wp_registered_widgets
     *
     * @param int $deprecated Not used.
     */
    public function update_callback( $deprecated = 1 ) {
        global $wp_registered_widgets;
 
        $all_instances = $this->get_settings();
/home/aparthot/public_html/wp-includes/widgets.php
         *
         * @param array $widget {
         *     An associative array of widget arguments.
         *
         *     @type string   $name        Name of the widget.
         *     @type string   $id          Widget ID.
         *     @type callable $callback    When the hook is fired on the front end, `$callback` is an array
         *                                 containing the widget object. Fired on the back end, `$callback`
         *                                 is 'wp_widget_control', see `$_callback`.
         *     @type array    $params      An associative array of multi-widget arguments.
         *     @type string   $classname   CSS class applied to the widget container.
         *     @type string   $description The widget description.
         *     @type array    $_callback   When the hook is fired on the back end, `$_callback` is populated
         *                                 with an array containing the widget object, see `$callback`.
         * }
         */
        do_action( 'dynamic_sidebar', $wp_registered_widgets[ $id ] );
 
        if ( is_callable( $callback ) ) {
            call_user_func_array( $callback, $params );
            $did_one = true;
        }
    }
 
    if ( ! is_admin() && ! empty( $sidebar['after_sidebar'] ) ) {
        echo $sidebar['after_sidebar'];
    }
 
    /**
     * Fires after widgets are rendered in a dynamic sidebar.
     *
     * Note: The action also fires for empty sidebars, and on both the front end
     * and back end, including the Inactive Widgets sidebar on the Widgets screen.
     *
     * @since 3.9.0
     *
     * @param int|string $index       Index, name, or ID of the dynamic sidebar.
     * @param bool       $has_widgets Whether the sidebar is populated with widgets.
     *                                Default true.
     */
/home/aparthot/public_html/wp-content/themes/milenia/sidebar.php
<?php
/**
* The template file for displaying sidebar
*
* @package WordPress
* @subpackage Milenia
* @since Milenia 1.0
*/
 
// Prevent the direct loading of the file
if ( ! defined( 'ABSPATH' ) ) {
    die( esc_html__('You cannot access this file directly', 'milenia') );
}
 
global $MileniaLayout;
 
if(is_active_sidebar($MileniaLayout->getSidebar())) : ?>
    <div class="milenia-grid">
        <?php dynamic_sidebar($MileniaLayout->getSidebar()); ?>
    </div>
<?php endif; ?>
 
/home/aparthot/public_html/wp-includes/template.php
 
    if ( is_array( $wp_query->query_vars ) ) {
        /*
         * This use of extract() cannot be removed. There are many possible ways that
         * templates could depend on variables that it creates existing, and no way to
         * detect and deprecate it.
         *
         * Passing the EXTR_SKIP flag is the safest option, ensuring globals and
         * function variables cannot be overwritten.
         */
        // phpcs:ignore WordPress.PHP.DontExtract.extract_extract
        extract( $wp_query->query_vars, EXTR_SKIP );
    }
 
    if ( isset( $s ) ) {
        $s = esc_attr( $s );
    }
 
    if ( $require_once ) {
        require_once $_template_file;
    } else {
        require $_template_file;
    }
}
 
/home/aparthot/public_html/wp-includes/template.php
function locate_template( $template_names, $load = false, $require_once = true, $args = array() ) {
    $located = '';
    foreach ( (array) $template_names as $template_name ) {
        if ( ! $template_name ) {
            continue;
        }
        if ( file_exists( STYLESHEETPATH . '/' . $template_name ) ) {
            $located = STYLESHEETPATH . '/' . $template_name;
            break;
        } elseif ( file_exists( TEMPLATEPATH . '/' . $template_name ) ) {
            $located = TEMPLATEPATH . '/' . $template_name;
            break;
        } elseif ( file_exists( ABSPATH . WPINC . '/theme-compat/' . $template_name ) ) {
            $located = ABSPATH . WPINC . '/theme-compat/' . $template_name;
            break;
        }
    }
 
    if ( $load && '' !== $located ) {
        load_template( $located, $require_once, $args );
    }
 
    return $located;
}
 
/**
 * Require the template file with WordPress environment.
 *
 * The globals are set up for the template file to ensure that the WordPress
 * environment is available from within the function. The query variables are
 * also available.
 *
 * @since 1.5.0
 * @since 5.5.0 The `$args` parameter was added.
 *
 * @global array      $posts
 * @global WP_Post    $post          Global post object.
 * @global bool       $wp_did_header
 * @global WP_Query   $wp_query      WordPress Query object.
 * @global WP_Rewrite $wp_rewrite    WordPress rewrite component.
/home/aparthot/public_html/wp-includes/general-template.php
     * Fires before the sidebar template file is loaded.
     *
     * @since 2.2.0
     * @since 2.8.0 The `$name` parameter was added.
     * @since 5.5.0 The `$args` parameter was added.
     *
     * @param string|null $name Name of the specific sidebar file to use. Null for the default sidebar.
     * @param array       $args Additional arguments passed to the sidebar template.
     */
    do_action( 'get_sidebar', $name, $args );
 
    $templates = array();
    $name      = (string) $name;
    if ( '' !== $name ) {
        $templates[] = "sidebar-{$name}.php";
    }
 
    $templates[] = 'sidebar.php';
 
    if ( ! locate_template( $templates, true, true, $args ) ) {
        return false;
    }
}
 
/**
 * Loads a template part into a template.
 *
 * Provides a simple mechanism for child themes to overload reusable sections of code
 * in the theme.
 *
 * Includes the named template part for a theme or if a name is specified then a
 * specialised part will be included. If the theme contains no {slug}.php file
 * then no template will be included.
 *
 * The template is included using require, not require_once, so you may include the
 * same template part multiple times.
 *
 * For the $name parameter, if the file is called "{slug}-special.php" then specify
 * "special".
 *
/home/aparthot/public_html/wp-content/themes/milenia/page.php
if($MileniaLayout->isFullWidth())
{
    array_push($milenia_main_section_classes, 'milenia-section--stretched-content-no-px');
}
 
// load header.php
get_header();
?>
<div class="milenia-section <?php echo esc_attr($MileniaHelper->getSanitizedHtmlClasses($milenia_main_section_classes)); ?>">
    <div class="row">
        <!-- - - - - - - - - - - - - - Main Content Column - - - - - - - - - - - - - - - - -->
        <main class="<?php echo esc_attr($MileniaLayout->getMainLayoutClasses('main')); ?>">
            <?php get_template_part('template-parts/page-layouts/page-layout', preg_replace('/milenia-/', '', $MileniaLayout->getPageType())); ?>
        </main>
        <!-- - - - - - - - - - - - - - End of Main Content Column - - - - - - - - - - - - - - - - -->
 
        <?php if($MileniaLayout->hasSidebar()) : ?>
            <!-- - - - - - - - - - - - - - Sidebar - - - - - - - - - - - - - - - - -->
            <aside class="milenia-sidebar <?php echo esc_attr($MileniaLayout->getMainLayoutClasses('side')); ?>" id="milenia-sidebar">
                <?php get_sidebar(); ?>
            </aside>
            <!-- - - - - - - - - - - - - - End of Sidebar - - - - - - - - - - - - - - - - -->
        <?php endif; ?>
    </div>
</div>
<?php
 
// load footer.php
get_footer();
?>
 
/home/aparthot/public_html/wp-includes/template-loader.php
            }
 
            break;
        }
    }
 
    if ( ! $template ) {
        $template = get_index_template();
    }
 
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    $template = apply_filters( 'template_include', $template );
    if ( $template ) {
        include $template;
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
}
 
/home/aparthot/public_html/wp-blog-header.php
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( ! isset( $wp_did_header ) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once __DIR__ . '/wp-load.php';
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once ABSPATH . WPINC . '/template-loader.php';
 
}
 
/home/aparthot/public_html/index.php
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */
 
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );
 
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /blog-classic-v2/
CONTEXT_DOCUMENT_ROOT /home/aparthot/public_html
CONTEXT_PREFIX
DOCUMENT_ROOT /home/aparthot/public_html
GATEWAY_INTERFACE CGI/1.1
HTTPS on
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING br,gzip
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_AUTHORIZATION
HTTP_CONNECTION Keep-Alive
HTTP_HOST www.aparthotelgudaurihills.com
HTTP_IF_MODIFIED_SINCE Thu, 21 Oct 2021 17:46:45 GMT
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_X_HTTPS 1
PATH /bin:/usr/bin
QUERY_STRING
REDIRECT_HTTPS on
REDIRECT_HTTP_AUTHORIZATION
REDIRECT_SCRIPT_URI https://www.aparthotelgudaurihills.com/blog-classic-v2/
REDIRECT_SCRIPT_URL /blog-classic-v2/
REDIRECT_SSL_TLS_SNI www.aparthotelgudaurihills.com
REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID YpARG9WURefq8wFnchKdugAAAAQ
REDIRECT_URL /blog-classic-v2/
REMOTE_ADDR 18.207.132.226
REMOTE_PORT 57092
REQUEST_METHOD GET
REQUEST_SCHEME https
SCRIPT_FILENAME /home/aparthot/public_html/index.php
SCRIPT_NAME /index.php
SCRIPT_URI https://www.aparthotelgudaurihills.com/blog-classic-v2/
SCRIPT_URL /blog-classic-v2/
SERVER_ADDR 188.93.90.230
SERVER_ADMIN webmaster@aparthotelgudaurihills.com
SERVER_NAME www.aparthotelgudaurihills.com
SERVER_PORT 443
SERVER_PROTOCOL HTTP/1.1
SERVER_SIGNATURE
SSL_TLS_SNI www.aparthotelgudaurihills.com
TZ Asia/Tbilisi
UNIQUE_ID YpARG9WURefq8wFnchKdugAAAAQ
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1653608731.4727
REQUEST_TIME 1653608731
argv Array ( )
argc 0
Key Value
CONTEXT_DOCUMENT_ROOT /home/aparthot/public_html
CONTEXT_PREFIX
DOCUMENT_ROOT /home/aparthot/public_html
GATEWAY_INTERFACE CGI/1.1
HTTPS on
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING br,gzip
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_AUTHORIZATION
HTTP_CONNECTION Keep-Alive
HTTP_HOST www.aparthotelgudaurihills.com
HTTP_IF_MODIFIED_SINCE Thu, 21 Oct 2021 17:46:45 GMT
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_X_HTTPS 1
PATH /bin:/usr/bin
QUERY_STRING
REDIRECT_HTTPS on
REDIRECT_HTTP_AUTHORIZATION
REDIRECT_SCRIPT_URI https://www.aparthotelgudaurihills.com/blog-classic-v2/
REDIRECT_SCRIPT_URL /blog-classic-v2/
REDIRECT_SSL_TLS_SNI www.aparthotelgudaurihills.com
REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID YpARG9WURefq8wFnchKdugAAAAQ
REDIRECT_URL /blog-classic-v2/
REMOTE_ADDR 18.207.132.226
REMOTE_PORT 57092
REQUEST_METHOD GET
REQUEST_SCHEME https
REQUEST_URI /blog-classic-v2/
SCRIPT_FILENAME /home/aparthot/public_html/index.php
SCRIPT_NAME /index.php
SCRIPT_URI https://www.aparthotelgudaurihills.com/blog-classic-v2/
SCRIPT_URL /blog-classic-v2/
SERVER_ADDR 188.93.90.230
SERVER_ADMIN webmaster@aparthotelgudaurihills.com
SERVER_NAME www.aparthotelgudaurihills.com
SERVER_PORT 443
SERVER_PROTOCOL HTTP/1.1
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
SSL_TLS_SNI www.aparthotelgudaurihills.com
TZ Asia/Tbilisi
UNIQUE_ID YpARG9WURefq8wFnchKdugAAAAQ
0. Whoops\Handler\PrettyPageHandler