Support » Plugin: Mihdan: Yandex Turbo Feed » disable_dev_mode() must be an instance of ReduxFramework

  • Resolved orlov0562

    (@orlov0562)


    После обновления WP до последней версии, сайт перестал работать. Trace ошибки:

    
    PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Mihdan_Yandex_Turbo_Feed_Settings::disable_dev_mode() must be an instance of ReduxFramework, instance of  given, called in /var/www/wp-includes/class-wp-hook.php on line 286 and defined in /var/www/wp-content/plugins/mihdan-yandex-turbo-feed/includes/class-mihdan-yandex-turbo-feed-settings.php:18, referer: https://www.site.com/
    
    Stack trace:, referer: https://www.site.com/
    
    stderr: #0 /var/www/wp-includes/class-wp-hook.php(286): Mihdan_Yandex_Turbo_Feed_Settings->disable_dev_mode(Object(ReduxCore\\ReduxFramework\\ReduxFramework)), referer: https://www.site.com/
    
    stderr: #1 /var/www/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array), referer: https://www.site.com/
    
    stderr: #2 /var/www/wp-includes/plugin.php(465): WP_Hook->do_action(Array), referer: https://www.site.com/
    
    stderr: #3 /var/www/wp-content/plugins/accelerated-mobile-pages/includes/options/redux-core/framework.php(317): do_action('redux/construct', Object(ReduxCore\\ReduxFramework\\ReduxFramewo in /var/www/wp-content/plugins/mihdan-yandex-turbo-feed/includes/class-mihdan-yandex-turbo-feed-settings.php on line 18, referer: https://www.site.com/
    

    Времени разбираться нет, пришлось, вручную убрать тип в функции:

    
    	/**
    	 * Отключаем режима разработки
    	 *
    	 * @param ReduxFramework $redux
    	 */
    	public function disable_dev_mode( $redux ) {
                if (is_object($redux) && $redux instanceof ReduxFramework) {
                    $redux->args['dev_mode'] = false;
                    $redux->args['forced_dev_mode_off'] = false;
                }
    	}
    

    Если это глобальная проблема, исправьте пожалуйста

    P.S. PHP 7.2.5

    • This topic was modified 2 years, 6 months ago by orlov0562.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘disable_dev_mode() must be an instance of ReduxFramework’ is closed to new replies.