table-of-contents-plus icon indicating copy to clipboard operation
table-of-contents-plus copied to clipboard

PHP Warning: Attempt to read property "post_content" on null

Open mitsunori-yoshizaki opened this issue 11 months ago • 4 comments

The affected part raises the error PHP Warning: Attempt to read property "post_content" on null in PHP 8.1.22

PHP Warning: Attempt to read property "post_content" on null in [FILEPATH]/wp-content/plugins/table-of-contents-plus/includes/class-toc-plus.php on line 1533',

mitsunori-yoshizaki avatar Feb 28 '24 02:02 mitsunori-yoshizaki

Thanks for reporting this, what steps do you follow to trigger this warning?

zedzedzed avatar Feb 28 '24 04:02 zedzedzed

Thanks for the reply. This error occurs when displaying the submission completion screen from a contact form created with another plugin.

mitsunori-yoshizaki avatar Feb 28 '24 06:02 mitsunori-yoshizaki

Are you able to try the latest change from https://github.com/zedzedzed/table-of-contents-plus/archive/refs/heads/main.zip and let me know if that resolves your issue?

zedzedzed avatar Feb 28 '24 10:02 zedzedzed

I've tried table-of-contents-plus-main.zip and the issue was resolved! Thank you for your swift response :‑D

mitsunori-yoshizaki avatar Feb 29 '24 03:02 mitsunori-yoshizaki