• ashdowntech

    (@ashdowntech)


    Let me start by saying that this is an AMAZING plugin that does work that no other plugin can do that I have found. I’ve used it in several projects that needed syndication from RSS and it is an absolutely essential tool.

    That said, both the newly released version and the previous version have a fatal error that appears in PHP 8.2 (and which is NOT present in PHP 7.x).

    There are at least 2 instances where a call to get_option(‘feedwordpress_diagnostics_show’) is used. However, at least in my situation, that call returns a STRING. Then later in the code, the value is checked using the in_array() PHP function. However, it’s not valid to pass a string to in_array() in PHP 8.2 and so it throws a fatal error which crashes the entire WordPress admin.

    I’ve worked around the issue by doing the following:

    On line 122 of feedwordpressdiagnostic.class.php, I’ve wrapped the get_option(‘feedwordpress_diagnostics_show’) inside an array() declaration so that the string is inside an array.

    On line 190 of diagnostics-page.php, I have done the same wrap as above to assure that the value returned is an array.

    This may not be the best solution if the value for others DOES return an array of values since you’ll now have a nested array, but if your site is broken, this will get it going again.

    If I could ask the developer to please implement a fix for this issue so that the plugin works natively in PHP 8, that would be incredibly appreciated. Thank you!

    • This topic was modified 10 months ago by ashdowntech.
  • The topic ‘Fatal Error with PHP 8.2’ is closed to new replies.