zedzedzed / table-of-contents-plus

https://wordpress.org/plugins/table-of-contents-plus/
GNU General Public License v2.0
53 stars 27 forks source link

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

Open mitsunori-yoshizaki opened 8 months ago

mitsunori-yoshizaki commented 8 months ago

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',

zedzedzed commented 8 months ago

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

mitsunori-yoshizaki commented 8 months ago

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

zedzedzed commented 8 months ago

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?

mitsunori-yoshizaki commented 8 months ago

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