Hello,
I am using Osclass with a blog plugin, and after upgrading to PHP 8 I started getting many warnings in the error log.
The warnings look like this:
PHP Warning: Undefined array key "fk_i_user_id"
PHP Warning: Undefined array key "pk_i_id"
PHP Warning: Undefined array key "i_category"
PHP Warning: Undefined array key "dt_pub_date"
PHP Warning: Undefined array key "i_view"
PHP Warning: Undefined array key "s_image"The errors come from these files:
oc-content/plugins/blog/form/article.php
oc-content/plugins/blog/form/sidebar.php
oc-content/plugins/blog/functions.php
My questions:
Why is $article missing these keys in some pages?
Is this a compatibility issue with PHP 8 or a plugin bug?
What is the correct way to fix this in Osclass plugins?
Should I use isset() / ?? everywhere, or is there a better global fix?
Additional info:
The blog works, but these warnings appear on almost every article page.
Any help would be appreciated.