Quantcast
Channel: WordPress.org Forums » [WP-Syntax] Support
Viewing all articles
Browse latest Browse all 30

PHP Fatal error: Uncaught TypeError: Unsupported operand types: WP_Post

$
0
0

Replies: 0

I just had to disable this plugin. Here’s the error:

[18-Jan-2024 21:13:32 UTC] PHP Fatal error:  Uncaught TypeError: Unsupported operand types: WP_Post - int in /home/gh78lgt5yoiy/public_html/wp-content/plugins/wp-syntax/wp-syntax.php:400
Stack trace:
#0 /home/gh78lgt5yoiy/public_html/wp-includes/class-wp-hook.php(324): WP_Syntax::afterFilterContent()
#1 /home/gh78lgt5yoiy/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#2 /home/gh78lgt5yoiy/public_html/wp-content/themes/inventory-presser-theme/page-28.php(100): apply_filters()
#3 /home/gh78lgt5yoiy/public_html/wp-includes/template-loader.php(106): include('/home/gh78lgt5yoiy/p...')
#4 /home/gh78lgt5yoiy/public_html/wp-blog-header.php(19): require_once('/home/gh78lgt5yoiy/p...')
#5 /home/gh78lgt5yoiy/public_html/index.php(17): require('/home/gh78lgt5yoiy/p...')
#6 {main}
  thrown in /home/gh78lgt5yoiy/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 400
[18-Jan-2024 21:13:41 UTC] PHP Warning:  Attempt to read property "ID" on null in /home/gh78lgt5yoiy/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 395

Line 100 of page-28.php looks like this:

echo apply_filters( 'the_content', get_the_content( null, false, $page_id ) );

This is including the content of one page inside another. Not the best way to do things, I think this theme was written in 2015.


Viewing all articles
Browse latest Browse all 30

Trending Articles