Title: PHP 8 Errors
Last modified: January 25, 2023

---

# PHP 8 Errors

 *  [shanse2](https://wordpress.org/support/users/shanse2/)
 * (@shanse2)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-8-errors-9/)
 * Our web host recently upgraded to PHP 8.0. Now, we get an error when we try to
   upload a spreadsheet. Here’s the message from the error log:
 * PHP Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be 
   of type ?array, string given in /public/wp-content/plugins/ymm-search/Model/Db/
   CsvImportHandler.php:57
 * Stack trace:
 * #0 /public/wp-content/plugins/ymm-search/Model/Db/CsvImportHandler.php(57): implode(
   Array, ‘”,”‘)
 * #1 /public/wp-content/plugins/ymm-search/Controller/Adminhtml/Ymm/Selector.php(
   38): Pektsekye_Ymm_Model_Db_CsvImportHandler->importFromCsvFile(Array, ‘add_new’)
 * #2 /public/wp-includes/class-wp-hook.php(308): Pektsekye_Ymm_Controller_Adminhtml_Ymm_Selector-
   >execute(”)
 * #3 /public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
 * #4 /public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
 * #5 /public/wp-settings.php(617): do_action(‘init’)
 * Is there something I can do to correct this?
 * Thanks!

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

 *  Plugin Author [Pektsekye](https://wordpress.org/support/users/pektsekye/)
 * (@pektsekye)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-8-errors-9/#post-16408804)
 * Hello,
 * Try to replace:
 * `implode($fieldNames,'","')`
 * with:
 * `implode('","', $fieldNames)`
 * on line 57 in the file:
 * wp-content/plugins/ymm-search/Model/Db/CsvImportHandler.php
 * Stanislav
 *  Thread Starter [shanse2](https://wordpress.org/support/users/shanse2/)
 * (@shanse2)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-8-errors-9/#post-16408841)
 * Thank you for the fast response! When I make that change and try to upload a 
   CSV, I get this error on the upload page:
 * “Ymm CSV file has not been imported. The first row in the .csv file must contain
   correct column names. And the columns should have special order: “product_sku”,”
   brand”,”series”,”model””
 *  Plugin Author [Pektsekye](https://wordpress.org/support/users/pektsekye/)
 * (@pektsekye)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-8-errors-9/#post-16409388)
 * Hello,
 * So the csv file should contains the columns:
 * “product_sku”,”brand”,”series”,”model””
 * Or send the .csv file to me [pektsekye@gmail.com](https://wordpress.org/support/topic/php-8-errors-9/pektsekye@gmail.com?output_format=md)
   I will check it.
 * Stanislav
 *  Thread Starter [shanse2](https://wordpress.org/support/users/shanse2/)
 * (@shanse2)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-8-errors-9/#post-16409588)
 * I took a look at the CSV and the column names looked fine, but it still wouldn’t
   upload. So, I exported the current CSV file, pasted the new data in that file,
   and re-uploaded it. That worked! It’s all running as it should again. Thank you
   so much for your help!

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

The topic ‘PHP 8 Errors’ is closed to new replies.

 * ![](https://ps.w.org/ymm-search/assets/icon-256x256.png?rev=1750193)
 * [Year Make Model Search for WooCommerce](https://wordpress.org/plugins/ymm-search/)
 * [Support Threads](https://wordpress.org/support/plugin/ymm-search/)
 * [Active Topics](https://wordpress.org/support/plugin/ymm-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ymm-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ymm-search/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [shanse2](https://wordpress.org/support/users/shanse2/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/php-8-errors-9/#post-16409588)
 * Status: not resolved