Support » Plugin: PHP Code for posts » PHP notice

  • Query monitor reports this PHP error:

    
    Notice	Undefined property: stdClass::$slug	1	wp-content/plugins/php-code-for-posts/Classes/Snippet.php:19	
    

    Stack trase:

    
    PhpCodeForPosts_Snippet::create_from_database_object()
    wp-content/plugins/php-code-for-posts/Classes/Database.php:92
    PhpCodeForPosts_Database::load_single_snippet()
    wp-content/plugins/php-code-for-posts/Classes/Shortcode.php:34
    PhpCodeForPosts_Shortcode::handle_shortcode()
    wp-includes/shortcodes.php:345
    do_shortcode_tag()
    Unknown location
    preg_replace_callback()
    wp-includes/shortcodes.php:223
    do_shortcode()
    wp-includes/class-wp-hook.php:298
    apply_filters('the_content')
    wp-includes/post-template.php:240
    the_content()
    wp-content/themes/virtue/templates/content-page.php:2
    load_template('~/wp-content/themes/virtue/templates/content-page.php')
    wp-includes/template.php:647
    locate_template()
    wp-includes/general-template.php:167
    get_template_part('templates/content','page')
    wp-content/themes/virtue/page.php:11	Plugin: php-code-for-posts
    

    The php code from the snippet is executed.

  • The topic ‘PHP notice’ is closed to new replies.