PHP Fatal error: Attempt to assign property start on null ..
-
Getting PHP Fatal errors in error log on a client website with Event Post 5.7 in combination with Yoast SEO 19.14 and WordPress 6.1.1
PHP Warning: Attempt to read property "ID" on null in ..wp-content/plugins/event-post/eventpost.php on line 1688 PHP Fatal error: Uncaught Error: Attempt to assign property "start" on null in ..wp-content/plugins/event-post/eventpost.php:1688 Stack trace: #0 ..wp-content/plugins/event-post/eventpost.php(724): EventPost->retreive() #1 ..wp-includes/class-wp-hook.php(310): EventPost->wpseo_schema_webpage(Array) #2 ..wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #3 ..wp-content/plugins/wordpress-seo/src/generators/schema-generator.php(150): apply_filters('wpseo_schema_we...', Array, Object(Yoast\WP\SEO\Context\Meta_Tags_Context), Object(Yoast\WP\SEO\Generators\Schema\WebPage), Array) #4 ..wp-content/plugins/wordpress-seo/src/generators/schema-generator.php(76): Yoast\WP\SEO\Generators\Schema_Generator->generate_graph(Array, Object(Yoast\WP\SEO\Context\Meta_Tags_Context)) #5 ..wp-content/plugins/wordpress-seo/src/presentations/indexable-presentation.php(718): Yoast\WP\SEO\Generators\Schema_Generator->generate(Object(Yoast\WP\SEO\Context\Meta_Tags_Context)) #6 ..wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php(66): Yoast\WP\SEO\Presentations\Indexable_Presentation->generate_schema() #7 ..wp-content/plugins/wordpress-seo/src/presenters/schema-presenter.php(60): Yoast\WP\SEO\Presentations\Abstract_Presentation->__get('schema') #8 ..wp-content/plugins/wordpress-seo/src/presenters/schema-presenter.php(44): Yoast\WP\SEO\Presenters\Schema_Presenter->get() #9 ..wp-content/plugins/wordpress-seo/src/integrations/front-end-integration.php(326): Yoast\WP\SEO\Presenters\Schema_Presenter->present() #10 ..wp-includes/class-wp-hook.php(308): Yoast\WP\SEO\Integrations\Front_End_Integration->present_head('') #11 ..wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array) #12 ..wp-includes/plugin.php(517): WP_Hook->do_action(Array) #13 ..wp-content/plugins/wordpress-seo/src/integrations/front-end-integration.php(300): do_action('wpseo_head') #14 ..wp-includes/class-wp-hook.php(308): Yoast\WP\SEO\Integrations\Front_End_Integration->call_wpseo_head('') #15 ..wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #16 ..wp-includes/plugin.php(517): WP_Hook->do_action(Array) #17 ..wp-includes/general-template.php(3043): do_action('wp_head') #18 ..wp-content/themes/hueman/header.php(9): wp_head() #19 ..wp-includes/template.php(783): require_once('/is/htdocs/wp10...') #20 ..wp-includes/template.php(718): load_template('/is/htdocs/wp10...', true, Array) #21 ..wp-includes/general-template.php(48): locate_template(Array, true, true, Array) #22 ..wp-content/themes/hueman/archive.php(1): get_header() #23 ..wp-includes/template-loader.php(106): include('/is/htdocs/wp10...') #24 ..wp-blog-header.php(19): require_once('/is/htdocs/wp10...') #25 ..index.php(17): require('/is/htdocs/wp10...') #26 {main} thrown in ..wp-content/plugins/event-post/eventpost.php on line 1688
In line 1688 it seems
$ob
isnull
under some circumstances:$ob->start = get_post_meta($ob->ID, $this->META_START, true);
Possible fix: Add a check after
$ob = get_post($event);
line 1682.Also, example code in plugin description seems to be invalid or formated in a wrong way.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘PHP Fatal error: Attempt to assign property start on null ..’ is closed to new replies.