Title: PHP Warning: array_merge
Last modified: June 20, 2022

---

# PHP Warning: array_merge

 *  Resolved [jpribble](https://wordpress.org/support/users/jpribble/)
 * (@jpribble)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php-warning-array_merge-5/)
 * I am receiving an error “PHP Warning: array_merge(): Expected parameter 1 to 
   be an array, string given in …/wp-content/plugins/seriously-simple-podcasting/
   php/classes/controllers/class-frontend-controller.php on line 1014”. The plugin
   appears to be functioning correctly, but wanted to see what may be causing this
   error or if it should be a concern.

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Support [keleigh824](https://wordpress.org/support/users/keleigh824/)
 * (@keleigh824)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php-warning-array_merge-5/#post-15756942)
 * Hi [@jpribble](https://wordpress.org/support/users/jpribble/)
 * What version of SSP are you running? Do you see this error live on the site or
   in the error_log?
 *  Thread Starter [jpribble](https://wordpress.org/support/users/jpribble/)
 * (@jpribble)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php-warning-array_merge-5/#post-15757604)
 * The error was showing in the back end, but now its just showing in the error 
   log. We are running version 2.13.0 of the SSP plugin, although I see a new version
   just came out yesterday. Does the new version provide a fix for this?
 *  Plugin Support [keleigh824](https://wordpress.org/support/users/keleigh824/)
 * (@keleigh824)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/php-warning-array_merge-5/#post-15851057)
 * Hi [@jpribble](https://wordpress.org/support/users/jpribble/)
 * Apologies for the delay, do you still see this error after upgrading? I’ve checked
   my own error logs while in 2.13 but so far I haven’t seen that error myself.
 *  Thread Starter [jpribble](https://wordpress.org/support/users/jpribble/)
 * (@jpribble)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/php-warning-array_merge-5/#post-15856935)
 * Thank you for following up on this. Yes, I am still receiving the error daily
   in the error logs – 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
 *  Plugin Author [Serhiy Zakharchenko](https://wordpress.org/support/users/zahardoc/)
 * (@zahardoc)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-warning-array_merge-5/#post-15921323)
 * Hello [@jpribble](https://wordpress.org/support/users/jpribble/)!
 * Could you please check if you use `ssp_tag_archive_post_types` filter? It looks
   like your filter function returns a string instead of an array.
 * Anyway, I’ll add additional checks for such cases. Also, it’s always a good practice
   to disable warnings on production sites – you can do it by disabling debug mode
   in wp-config.php:
 * `define( 'WP_DEBUG', false );`
 * Best regards,
    Sergiy
 *  Thread Starter [jpribble](https://wordpress.org/support/users/jpribble/)
 * (@jpribble)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-warning-array_merge-5/#post-15924927)
 * [@zahardoc](https://wordpress.org/support/users/zahardoc/) I’m not sure where
   to look for ssp_tag_archive_post_types and cannot find any other information 
   about it. Can you provide any other information about this?
    Also WP_DEBUG is
   set to false, but the errors are showing in the php_errorlog.
 *  Plugin Author [Serhiy Zakharchenko](https://wordpress.org/support/users/zahardoc/)
 * (@zahardoc)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-warning-array_merge-5/#post-15952609)
 * [@jpribble](https://wordpress.org/support/users/jpribble/)
    Yesterday we released
   a new version that should fix the problem. So no actions from your side are needed.
   Please update the plugin and check if the errors show up.
 *  Thread Starter [jpribble](https://wordpress.org/support/users/jpribble/)
 * (@jpribble)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-warning-array_merge-5/#post-15963521)
 * Yes we are still getting the error after updating the plugin, although now it
   appears to be recording it more frequently, about every 10-20 seconds all day.
   Here is an example:
 * [30-Aug-2022 13:52:12 UTC] PHP Warning: array_merge(): Expected parameter 1 to
   be an array, string given in /wp-content/plugins/seriously-simple-podcasting/
   php/classes/controllers/class-frontend-controller.php on line 704
    [30-Aug-2022
   13:52:26 UTC] PHP Warning: array_merge(): Expected parameter 1 to be an array,
   string given in /wp-content/plugins/seriously-simple-podcasting/php/classes/controllers/
   class-frontend-controller.php on line 704 [30-Aug-2022 13:52:36 UTC] PHP Warning:
   array_merge(): Expected parameter 1 to be an array, string given in /wp-content/
   plugins/seriously-simple-podcasting/php/classes/controllers/class-frontend-controller.
   php on line 704
 * However, the other site that we use the plugin on is not getting the error now.
   Please let me know if you need any other information from me to help figure out
   the issue. Thank you.
 *  Thread Starter [jpribble](https://wordpress.org/support/users/jpribble/)
 * (@jpribble)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-warning-array_merge-5/#post-15988792)
 * Any fix yet for this? We’re still getting the same error recorded every couple
   seconds in the error log, but now on a different line after the recent 2.16.2
   update:
    [07-Sep-2022 15:24:39 UTC] PHP Warning: array_merge(): Expected parameter
   1 to be an array, string given in /wp-content/plugins/seriously-simple-podcasting/
   php/classes/controllers/class-frontend-controller.php on line 722
 * I see a similar issue reported here: [https://wordpress.org/support/topic/php-warning-array_merge-6/](https://wordpress.org/support/topic/php-warning-array_merge-6/)
   which was marked resolved but it is still occurring even with the last couple
   updates. We have not made any customizations to the plugin code as you asked 
   in the other post. I viewed the file class-frontend-controller.php and the line
   referenced in the error shows $query->set( ‘post_type’, array_merge( $post_types,(
   array) $tag_archive_post_types ) );
 * Please let me know if you need any other info from me to help resolve this issue.
   Thanks
 *  Thread Starter [jpribble](https://wordpress.org/support/users/jpribble/)
 * (@jpribble)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-warning-array_merge-5/#post-16269227)
 * Checking in again on this as it still has not been resolved. We are still getting
   multiple warnings in our php_errorlog file [07-Dec-2022 15:09:36 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 728
    Does anyone have any idea why this is still
   occurring and what we can do to fix it?
 *  Plugin Author [Serhiy Zakharchenko](https://wordpress.org/support/users/zahardoc/)
 * (@zahardoc)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-warning-array_merge-5/#post-16279235)
 * [@jpribble](https://wordpress.org/support/users/jpribble/)
 * Thank you for reporting it!
 * Could you try to change _$post\_types_ to _(array) $post\_types_ on the line 
   728?
 * This:
 * `$query->set( 'post_type', array_merge( $post_types, (array) $tag_archive_post_types));`
 * To this:
 * `$query->set( 'post_type', array_merge( ( array ) $post_types, (array) $tag_archive_post_types));`
 * Does it fix the problem?
 *  Thread Starter [jpribble](https://wordpress.org/support/users/jpribble/)
 * (@jpribble)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-warning-array_merge-5/#post-16296470)
 * Yes the errors are no longer showing, thank you. Will this change be included
   in the next plugin update?
 *  Plugin Author [Serhiy Zakharchenko](https://wordpress.org/support/users/zahardoc/)
 * (@zahardoc)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-warning-array_merge-5/#post-16319039)
 * [@jpribble](https://wordpress.org/support/users/jpribble/) 
   Yes, I’ll include
   this change in the next plugin release.Thank you for helping make our plugin 
   better!

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘PHP Warning: array_merge’ is closed to new replies.

 * ![](https://ps.w.org/seriously-simple-podcasting/assets/icon-256x256.png?rev=
   970355)
 * [Seriously Simple Podcasting](https://wordpress.org/plugins/seriously-simple-podcasting/)
 * [Support Threads](https://wordpress.org/support/plugin/seriously-simple-podcasting/)
 * [Active Topics](https://wordpress.org/support/plugin/seriously-simple-podcasting/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/seriously-simple-podcasting/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/seriously-simple-podcasting/reviews/)

 * 13 replies
 * 3 participants
 * Last reply from: [Serhiy Zakharchenko](https://wordpress.org/support/users/zahardoc/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/php-warning-array_merge-5/#post-16319039)
 * Status: resolved