• Resolved askpivot

    (@askpivot)


    Hi! We are receiving this PHP warning multiple times a day, hoping a fix can be pushed soon:

    [29-Jun-2022 12:28:14 UTC] PHP Warning: array_merge(): Expected parameter 1 to be an array, string given in …/public_html/wp-content/plugins/seriously-simple-podcasting/php/classes/controllers/class-frontend-controller.php on line 1014

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter askpivot

    (@askpivot)

    Update, still getting multiple PHP Warnings a day, but the line number has shifted. Now it says
    [11-Aug-2022 05:47:15 UTC] PHP Warning: array_merge(): Expected parameter 1 to be an array, string given in /home/customer/www/evangelist.global/public_html/wp-content/plugins/seriously-simple-podcasting/php/classes/controllers/class-frontend-controller.php on line 690

    It would appear this line
    $tag_archive_post_types = apply_filters( 'ssp_tag_archive_post_types', array( 'post', SSP_CPT_PODCAST ) );
    is returning not an array.

    • This reply was modified 2 years, 7 months ago by askpivot.
    Plugin Author Serhiy Zakharchenko

    (@zahardoc)

    Hello @askpivot!

    Did you ask someone for any plugin customization?
    It looks like somewhere in your code the filter ‘ssp_tag_archive_post_types’ is misused, and returns a string instead of the array.

    Please try to look for something like add_filter('ssp_tag_archive_post_types'..." in your code.

    Also, disabling any warnings on your production sites is always a good idea. To do it, please check your wp-config.php file, and make sure that WP_DEBUG is disabled:

    define( 'WP_DEBUG', false );

    Best regards,

    Sergiy, development team.

    Plugin Author Serhiy Zakharchenko

    (@zahardoc)

    @askpivot

    Anyway, thank you for bringing it to our attention. I’m going to add some additional checks there to prevent such warnings in the future.

    Thread Starter askpivot

    (@askpivot)

    Okay, I do not see any calls anywhere in our code that apply to the filter ‘ssp_tag_archive_post_types’.

    These notices are in our error logs, not public facing.

    Thank you! Hoping those safeguards you add remove this notice for us. ??

    Thread Starter askpivot

    (@askpivot)

    Marking resolved.

    Plugin Author Serhiy Zakharchenko

    (@zahardoc)

    @askpivot

    Yes, we resolved it in our recent plugin release. Thank you for your feedback and enjoy the plugin!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP Warning: array_merge() …’ is closed to new replies.