Title: Uncaught TypeErrors when using Crop Thumbnails locally
Last modified: April 5, 2021

---

# Uncaught TypeErrors when using Crop Thumbnails locally

 *  Resolved [iker3085](https://wordpress.org/support/users/iker3085/)
 * (@iker3085)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/uncaught-typeerrors-when-using-crop-thumbnails-locally/)
 * I recently migrated a project to my local machine and for some reason, I keep
   getting errors when using the Crop Thumbnails plugin.
 * When I run the plugin quick test, I get `Failure processing the test - have a
   look on your server logs.`, WP debug log shows
 *     ```
       PHP Fatal error:  Uncaught TypeError: join(): Argument #2 ($array) must be of type ?array, string given in C:\xampp\htdocs\xxx\wp-content\plugins\crop-thumbnails\functions\settingsscreen.php:374
       Stack trace:
       #0 C:\xampp\htdocs\xxx\wp-content\plugins\crop-thumbnails\functions\settingsscreen.php(374): join(Array, '<br />')
       #1 C:\xampp\htdocs\xxx\wp-includes\class-wp-hook.php(292): CropThumbnailsSettingsScreen->ajax_callback_admin_quicktest('')
       #2 C:\xampp\htdocs\xxx\wp-includes\class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
       #3 C:\xampp\htdocs\xxx\wp-includes\plugin.php(484): WP_Hook->do_action(Array)
       #4 C:\xampp\htdocs\xxx\wp-admin\admin-ajax.php(187): do_action('wp_ajax_ctpplug...')
       #5 {main}
         thrown in C:\xampp\htdocs\xxx\wp-content\plugins\crop-thumbnails\functions\settingsscreen.php on line 374
       ```
   
 * When I try cropping an image in the media section, I get
 *     ```
       PHP Fatal error:  Uncaught TypeError: copy(): Argument #1 ($from) must be of type string, WP_Error given in C:\xampp\htdocs\xxx\wp-content\plugins\crop-thumbnails\functions\save.php:102
       Stack trace:
       #0 C:\xampp\htdocs\xxx\wp-content\plugins\crop-thumbnails\functions\save.php(102): copy(Object(WP_Error), 'C:\\xampp\\htdocs...')
       #1 C:\xampp\htdocs\xxx\wp-content\plugins\crop-thumbnails\functions\save.php(247): CptSaveThumbnail::saveThumbnail()
       #2 C:\xampp\htdocs\xxx\wp-includes\class-wp-hook.php(292): CptSaveThumbnail::saveThumbnailAjaxWrap('')
       #3 C:\xampp\htdocs\xxx\wp-includes\class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
       #4 C:\xampp\htdocs\xxx\wp-includes\plugin.php(484): WP_Hook->do_action(Array)
       #5 C:\xampp\htdocs\xxx\wp-admin\admin-ajax.php(187): do_action('wp_ajax_cptSave...')
       #6 {main}
         thrown in C:\xampp\htdocs\xxx\wp-content\plugins\crop-thumbnails\functions\save.php on line 102
       ```
   
 * I’m running the same WP and plugin versions on prod and local, PHP versions are
   7.3.27 on prod and 7.4.3 on local via apache. Do you have any idea, what to do
   to make it work on both environments?

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

 *  Plugin Author [Volkmar Kantor](https://wordpress.org/support/users/volkmar-kantor/)
 * (@volkmar-kantor)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/uncaught-typeerrors-when-using-crop-thumbnails-locally/#post-14286252)
 * Hi there, thank you for reporting.
 * I think i fixed these bugs in the current developer editions (see below). These
   2 bugs occur if the php environment is configured strict. Seems that warnings
   and notices are handled as fatal errors.
 * Current developer edition download:
    [https://github.com/vollyimnetz/crop-thumbnails/archive/refs/heads/master.zip](https://github.com/vollyimnetz/crop-thumbnails/archive/refs/heads/master.zip)
 * Or Git clone from [https://github.com/vollyimnetz/crop-thumbnails](https://github.com/vollyimnetz/crop-thumbnails)
 * I cant guaranty that the plugin will run, but at least these two errors should
   be gone.
 *  Plugin Author [Volkmar Kantor](https://wordpress.org/support/users/volkmar-kantor/)
 * (@volkmar-kantor)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/uncaught-typeerrors-when-using-crop-thumbnails-locally/#post-14291621)
 * I fixed the two errors in 1.3.1 – please report if you find more.

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

The topic ‘Uncaught TypeErrors when using Crop Thumbnails locally’ is closed to 
new replies.

 * ![](https://ps.w.org/crop-thumbnails/assets/icon.svg?rev=1228698)
 * [Crop-Thumbnails](https://wordpress.org/plugins/crop-thumbnails/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/crop-thumbnails/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/crop-thumbnails/)
 * [Active Topics](https://wordpress.org/support/plugin/crop-thumbnails/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/crop-thumbnails/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/crop-thumbnails/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Volkmar Kantor](https://wordpress.org/support/users/volkmar-kantor/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/uncaught-typeerrors-when-using-crop-thumbnails-locally/#post-14291621)
 * Status: resolved