• Wordpress Version: 6.0
    Theme: Twenty Twenty-Two
    Plugin: 1.8.3

    I get the following error when using <?php if ( function_exists( 'get_the_last_modified_info' ) ) { get_the_last_modified_info(); } ?>

    syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)
    
    #0 /var/www/html/wordpress/wp-content/plugins/wp-last-modified-info/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/var/www/html/w...')
    #1 [internal function]: Composer\Autoload\ClassLoader->loadClass('Wplmi\\Core\\Fron...')
    #2 /var/www/html/wordpress/wp-content/plugins/wp-last-modified-info/functions.php(20): spl_autoload_call('Wplmi\\Core\\Fron...')
    #3 /var/www/html/wordpress/wp-content/plugins/lazy-blocks/classes/class-blocks.php(1238) : eval()'d code(1): get_the_last_modified_info()
    #4 /var/www/html/wordpress/wp-content/plugins/lazy-blocks/classes/class-blocks.php(1238): eval()
    #5 /var/www/html/wordpress/wp-content/plugins/lazy-blocks/classes/class-blocks.php(1369): LazyBlocks_Blocks->php_eval('render_callback(Array, NULL, 'frontend', Array)
    #7 /var/www/html/wordpress/wp-includes/rest-api/class-wp-rest-server.php(1143): LazyBlocks_Rest->block_constructor_preview(Object(WP_REST_Request))
    #8 /var/www/html/wordpress/wp-includes/rest-api/class-wp-rest-server.php(990): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/lazy-blocks/v1...', Array, NULL)
    #9 /var/www/html/wordpress/wp-includes/rest-api/class-wp-rest-server.php(414): WP_REST_Server->dispatch(Object(WP_REST_Request))
    #10 /var/www/html/wordpress/wp-includes/rest-api.php(394): WP_REST_Server->serve_request('/lazy-blocks/v1...')
    #11 /var/www/html/wordpress/wp-includes/class-wp-hook.php(307): rest_api_loaded(Object(WP))
    #12 /var/www/html/wordpress/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
    #13 /var/www/html/wordpress/wp-includes/plugin.php(524): WP_Hook->do_action(Array)
    #14 /var/www/html/wordpress/wp-includes/class-wp.php(398): do_action_ref_array('parse_request', Array)
    #15 /var/www/html/wordpress/wp-includes/class-wp.php(770): WP->parse_request('')
    #16 /var/www/html/wordpress/wp-includes/functions.php(1330): WP->main('')
    #17 /var/www/html/wordpress/wp-blog-header.php(16): wp()
    #18 /var/www/html/wordpress/index.php(17): require('/var/www/html/w...')
    #19 {main}

    Probably related: [lmt-post-modified-info] does not show up on page.

    • This topic was modified 3 years, 12 months ago by paszau.
    • This topic was modified 3 years, 12 months ago by paszau. Reason: Added plugin version

The topic ‘Error when calling get_the_last_modified_info()’ is closed to new replies.