You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ErrorException
Warning: Attempt to read property "ID" on int
/seo-by-rank-math/includes/frontend/class-frontend.php in RankMath\Frontend\Frontend::rss_replace_vars at line 279
To Reproduce
The error was thrown in the rss search template.
The last part of the call stack where it leaves our code is: the_excerpt_rss();
After that it's WordPress core and rankmath.
Expected behavior
Fail gracefully.
In line 271 there is already a check for is_object() but in line 279 the $post is expected to be an instance of WP_Post
I suggest to wrap line 279 in a similar check, and on top, I suggest to replace the if ( is_object( $post ) ) with if ( $post instanceof \WP_Post ) in both cases.
Screenshots
Desktop (please complete the following information):
irrelevant
Smartphone (please complete the following information):
irrelevant
Additional context
none
The text was updated successfully, but these errors were encountered:
Describe the bug
My sentry reported:
ErrorException
Warning: Attempt to read property "ID" on int
/seo-by-rank-math/includes/frontend/class-frontend.php in RankMath\Frontend\Frontend::rss_replace_vars at line 279
To Reproduce
The error was thrown in the rss search template.
The last part of the call stack where it leaves our code is:
the_excerpt_rss();
After that it's WordPress core and rankmath.
Expected behavior
Fail gracefully.
In line 271 there is already a check for
is_object()
but in line 279 the$post
is expected to be an instance ofWP_Post
I suggest to wrap line 279 in a similar check, and on top, I suggest to replace the
if ( is_object( $post ) )
withif ( $post instanceof \WP_Post )
in both cases.Screenshots
Desktop (please complete the following information):
irrelevant
Smartphone (please complete the following information):
irrelevant
Additional context
none
The text was updated successfully, but these errors were encountered: