Title: Warning: Array to string conversion
Last modified: September 26, 2022

---

# Warning: Array to string conversion

 *  Resolved [coxinha](https://wordpress.org/support/users/coxinha/)
 * (@coxinha)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/)
 * Dear all,
 * after implenting the new widget Recent Jobs I receive an error for the template:
 * Warning: Array to string conversion in /…/wp-content/plugins/jobboardwp/includes/
   widgets/class-recent-jobs.php on line 65
 * I’m using SiteOrigin to build our page.
 * Could anyone help me please to solve this error message?
 * Thanks in advance.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwarning-array-to-string-conversion-6%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Mykyta Synelnikov](https://wordpress.org/support/users/nsinelnikov/)
 * (@nsinelnikov)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/#post-16045651)
 * Hi [@coxinha](https://wordpress.org/support/users/coxinha/)
 * Please try to edit wp-content/plugins/jobboardwp/includes/widgets/class-recent-
   jobs.php line 65 and replace
 * From:
 * `$arg = implode( ',', $arg );`
 * To:
 *     ```
       $value = implode( ',', $arg );
       $arg = $value;
       ```
   
 * Let me know if that works,
    Best Regards!
 *  Thread Starter [coxinha](https://wordpress.org/support/users/coxinha/)
 * (@coxinha)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/#post-16046821)
 * Thanks for your quick reply, [@nsinelnikov](https://wordpress.org/support/users/nsinelnikov/)
 * Changed the template as mentioned above – but error message keeps the same (I’ve
   deleted cache already).
 * Any other suggestions?
 * Thanks and regards!
 *  Plugin Author [Mykyta Synelnikov](https://wordpress.org/support/users/nsinelnikov/)
 * (@nsinelnikov)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/#post-16047034)
 * Hi [@coxinha](https://wordpress.org/support/users/coxinha/)
 * Could you share the screenshot with the Widget settings? I’ll try to replicate
   the same issue on my dev installation.
 * Let me know,
    Best Regards!
 *  Thread Starter [coxinha](https://wordpress.org/support/users/coxinha/)
 * (@coxinha)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/#post-16047164)
 * Sure. But it’s nearly default.
 * See [https://snipboard.io/L5ClgK.jpg](https://snipboard.io/L5ClgK.jpg)
 * [[
 *  Plugin Author [Mykyta Synelnikov](https://wordpress.org/support/users/nsinelnikov/)
 * (@nsinelnikov)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/#post-16047211)
 * Hi [@coxinha](https://wordpress.org/support/users/coxinha/)
 * And what PHP version do you use?
 * Best Regards!
 *  Thread Starter [coxinha](https://wordpress.org/support/users/coxinha/)
 * (@coxinha)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/#post-16047363)
 * Hi [@nsinelnikov](https://wordpress.org/support/users/nsinelnikov/)
 * PHP version 8.0
    WordPress 6.0.2 JobBoardWP 1.2.1
 * Rgds
 *  Plugin Author [Mykyta Synelnikov](https://wordpress.org/support/users/nsinelnikov/)
 * (@nsinelnikov)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/#post-16047509)
 * Hi [@coxinha](https://wordpress.org/support/users/coxinha/)
 * Please try to revert line 65 to
 * `$arg = implode( ',', $arg );`
 * And insert these lines before line 65.
    [⌊2022-09-27_15-32-05⌉](https://www.screencast.com/t/YQ4MktQDOw)
 *     ```
       if ( empty( $arg ) ) {
           continue;
       }
       ```
   
 * It works for my local dev installation with the same PHP, WP and JobBoardWP versions.
   
   Let me know if that works after changes on your side, Best Regards!
 *  Thread Starter [coxinha](https://wordpress.org/support/users/coxinha/)
 * (@coxinha)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/#post-16047668)
 * Hi [@nsinelnikov](https://wordpress.org/support/users/nsinelnikov/)
 * did as told. So former (amended) line 65 is now line 68. And I’m sorry to say
   but it still causes an error message.
 * [[
    -  This reply was modified 3 years, 8 months ago by [coxinha](https://wordpress.org/support/users/coxinha/).
    -  This reply was modified 3 years, 8 months ago by [coxinha](https://wordpress.org/support/users/coxinha/).
 *  Plugin Author [Mykyta Synelnikov](https://wordpress.org/support/users/nsinelnikov/)
 * (@nsinelnikov)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/#post-16047759)
 * Hi [@coxinha](https://wordpress.org/support/users/coxinha/)
 * It looks so strange. Could you make the var_dump() of the $arg variable for getting
   debug its value?
 * Please insert `var_dump($arg);` line before line 68.
 * Sorry for these issues, but since I can’t track down this issue, my only step
   is to do it this way.
 * Let me know,
    Best Regards!
 *  Thread Starter [coxinha](https://wordpress.org/support/users/coxinha/)
 * (@coxinha)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/#post-16047807)
 * Don’t worry, [@nsinelnikov](https://wordpress.org/support/users/nsinelnikov/)
 * You’re doing a great job!! I’m so happy about your support.
 * After inserting your code it’s getting worse. 🙂
 * This is how my code looks now:
    [](https://i0.wp.com/snipboard.io/fnVzXE.jpg?ssl=1)
 * And this is my new error message:
    array(8) { [“class”]=> string(22) “jb\widgets\
   Recent_Jobs” [“grid”]=> int(2) [“cell”]=> int(2) [“id”]=> int(11) [“widget_id”]
   => string(36) “7ca70136-fe0d-446a-a97f-4062c6bd027f” [“style”]=> array(4) { [“
   widget_css”]=> string(64) “overflow-y: scroll; height: 500px; margin-bottom: 
   0px!important;” [“mobile_css”]=> string(64) “overflow-y: scroll; height: 500px;
   margin-bottom: 0px!important;” [“background_image_attachment”]=> bool(false) [“
   background_display”]=> string(4) “tile” } [“cell_index”]=> int(1) [“widget_index”]
   => int(11) } Warning: Array to string conversion in /homepages/45/d616284114/
   htdocs/clickandbuilds/Butenploener/wp-content/plugins/jobboardwp/includes/widgets/
   class-recent-jobs.php on line 69
    -  This reply was modified 3 years, 8 months ago by [coxinha](https://wordpress.org/support/users/coxinha/).
    -  This reply was modified 3 years, 8 months ago by [coxinha](https://wordpress.org/support/users/coxinha/).
 *  Thread Starter [coxinha](https://wordpress.org/support/users/coxinha/)
 * (@coxinha)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/#post-16047854)
 * PS: I’m definitely not an expert at all but maybe it’s caused by using SiteOrigin.
 * Tried to implement your widget to my [right sidebar](https://butenploener.de/scheinwerfer-online)
   and there it’s working perfectly without any error message.
 * Also the shortcode `[jb_jobs]` isn’t working properly with SiteOrigin after the
   last update of JobBoardWP. It’s loading something but keeping empty:
 * [[
 * [[
    -  This reply was modified 3 years, 8 months ago by [coxinha](https://wordpress.org/support/users/coxinha/).
 *  Thread Starter [coxinha](https://wordpress.org/support/users/coxinha/)
 * (@coxinha)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/#post-16047889)
 * Checked the shortcode `[jb_jobs/]` on a “normal” new page without any SiteOrigin.
 * Searchbar is loading but nothing more (none of our jobs):
 * [[
 * On the other hand shortcode for implementing dashboard is working correctly…
 *  Plugin Author [Mykyta Synelnikov](https://wordpress.org/support/users/nsinelnikov/)
 * (@nsinelnikov)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/#post-16049459)
 * Hi [@coxinha](https://wordpress.org/support/users/coxinha/)
 * Thanks for the details.
 * 1. This code on line 60 will help you to resolve the issue with the Recent Jobs
   widget:
 *     ```
       if ( ! in_array( $key, array( 'number', 'category', 'type', 'remote_only', 'orderby', 'hide_filled', 'no_logo', 'no_job_types' ), true ) ) {
       	continue;
       }
       ```
   
 * [⌊2022-09-28_02-57-40⌉⌊2022-09-28_02-57-40⌉[
 * 2. As for the Jobs List. Do you have a public page with Jobs List shortcode where
   I may check the issues? Did you try to flush the cache or minified/optimize versions?
   Also please check you you have customized templates in a theme related to the
   JobBoardWP. You need to upgrade them based on the new versions for v1.2.1. See
   the list here [https://www.screencast.com/t/tW5l9geU](https://www.screencast.com/t/tW5l9geU)
 * Let me know if that works or you have other details or questions,
    Best Regards!
 *  Thread Starter [coxinha](https://wordpress.org/support/users/coxinha/)
 * (@coxinha)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/#post-16057758)
 * Hi [@nsinelnikov](https://wordpress.org/support/users/nsinelnikov/)
 * pls excuse my delayed reply.
 * First of all: Thanks for the new code. Now it’s working correctly!! 🙂
 * And finally thanks a lot for your hint concerning customized templates (it was
   js/jobs-list.php). Now also this page is working perfectly.
 * Will mark this post as solved.
 * Regards!
 *  Plugin Author [Mykyta Synelnikov](https://wordpress.org/support/users/nsinelnikov/)
 * (@nsinelnikov)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/#post-16057798)
 * Hi [@coxinha](https://wordpress.org/support/users/coxinha/)
 * Thanks for letting me know. Great that all works properly.
 * Best Regards!

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

The topic ‘Warning: Array to string conversion’ is closed to new replies.

 * ![](https://ps.w.org/jobboardwp/assets/icon-256x256.png?rev=3082138)
 * [JobBoardWP - Job Board Listings and Submissions](https://wordpress.org/plugins/jobboardwp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jobboardwp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jobboardwp/)
 * [Active Topics](https://wordpress.org/support/plugin/jobboardwp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jobboardwp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jobboardwp/reviews/)

## Tags

 * [PHP Warning](https://wordpress.org/support/topic-tag/php-warning/)

 * 15 replies
 * 2 participants
 * Last reply from: [Mykyta Synelnikov](https://wordpress.org/support/users/nsinelnikov/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/warning-array-to-string-conversion-6/#post-16057798)
 * Status: resolved