Title: Bug found and resolved
Last modified: October 2, 2026

---

# Bug found and resolved

 *  Resolved [uim7](https://wordpress.org/support/users/uim7/)
 * (@uim7)
 * [1 week ago](https://wordpress.org/support/topic/bug-found-and-resolved/)
 * Hello folks,
 * this is a bug report, as I couldnt find another place for this.
 * A few days ago one of my colleagues set a focus point on one of our images located
   on our homepage. Suddenly the whole site broke, and exited with a HTTP 500 response
   and with this error:
 *     ```wp-block-code
       [02-Oct-2026 09:49:41 UTC] PHP Fatal error: Uncaught TypeError: number_format(): Argument #1 ($num) must be of type float, string given in wp-content/plugins/theia-smart-thumbnails/src/WeCodePixels/TheiaSmartThumbnails/Pro/ProPostOptions.php:108Stack trace: 0 wp-content/plugins/theia-smart-thumbnails/src/WeCodePixels/TheiaSmartThumbnails/Pro/ProPostOptions.php(108): number_format() 1 wp-includes/class-wp-hook.php(353): WeCodePixels\TheiaSmartThumbnails\Pro\ProPostOptions::attachment_fields_to_edit() 2 wp-includes/plugin.php(206): WP_Hook->apply_filters() 3 wp-admin/includes/media.php(1955): apply_filters() 4 wp-includes/media.php(4885): get_compat_media_markup() 5 [internal function]: wp_prepare_attachment_for_js() 6 wp-admin/includes/ajax-actions.php(3126): array_map() 7 wp-includes/class-wp-hook.php(353): wp_ajax_query_attachments() 8 wp-includes/class-wp-hook.php(377): WP_Hook->apply_filters() 9 wp-includes/plugin.php(523): WP_Hook->do_action() 10 wp-admin/admin-ajax.php(192): do_action() 11 {main}thrown in wp-content/plugins/theia-smart-thumbnails/src/WeCodePixels/TheiaSmartThumbnails/Pro/ProPostOptions.php on line 108
       ```
   
 * I was able to arrange some debug outputs:
 *     ```wp-block-code
       [02-Oct-2026 09:49:41 UTC] PHP Notice:  UIM-DEBUG: focus_point[0] on Image-ID [theiaSmartThumbnails_picker_image_77109] on Post-ID [77109] with Preview-ID [theiaSmartThumbnails_picker_preview_77109] at Meta-POSITION [theiaSmartThumbnails_position] has VALUE [0] in wp-content/plugins/theia-smart-thumbnails/src/WeCodePixels/TheiaSmartThumbnails/Pro/ProPostOptions.php on line 89[02-Oct-2026 09:49:41 UTC] PHP Notice:  UIM-DEBUG: focus_point[1] on Image-ID [theiaSmartThumbnails_picker_image_77109] on Post-ID [77109] with Preview-ID [theiaSmartThumbnails_picker_preview_77109] at Meta-POSITION [theiaSmartThumbnails_position] has VALUE [.] in wp-content/plugins/theia-smart-thumbnails/src/WeCodePixels/TheiaSmartThumbnails/Pro/ProPostOptions.php on line 93
       ```
   
 * **So, the values of the x,y coordinates became “0” and “,”. **I was able to quick
   fix the bug within two plugin files by casting the passed values to float:
 *     ```wp-block-code
       // ~/wp-content/plugins/theia-smart-thumbnails/src/WeCodePixels/TheiaSmartThumbnails/Frontend.php (line 37+38):'focusPointX' => round( (float) $focusPoint[0], 4 ),'focusPointY' => round( (float) $focusPoint[1], 4 )
       ```
   
 * This solved the issue, the website showed up again without any error. The backend
   media screen was broken too, I fixed it with these lines:
 *     ```wp-block-code
       // ~/wp-content/plugins/theia-smart-thumbnails/src/WeCodePixels/TheiaSmartThumbnails/Pro/ProPostOptions.php (line 96+97): x: ' . number_format( (float) $focus_point[0], 10 ) . ',y: ' . number_format( (float) $focus_point[1], 10 ) . '
       ```
   
 * So far for my bug report, hope this helps. Versions:
   WordPress: 7.1.2Smush: 4.3.4
    -  This topic was modified 1 week ago by [uim7](https://wordpress.org/support/users/uim7/).

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

 *  Thread Starter [uim7](https://wordpress.org/support/users/uim7/)
 * (@uim7)
 * [1 week ago](https://wordpress.org/support/topic/bug-found-and-resolved/#post-19034911)
 * Sorry, wrong Plugin … this topic can be deleted..
 *  Plugin Support [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * (@wpmudev-support2)
 * [5 days, 3 hours ago](https://wordpress.org/support/topic/bug-found-and-resolved/#post-19036166)
 * Hello [@uim7](https://wordpress.org/support/users/uim7/)
 * Hope you are doing well today.
 * The error appear to be related to theia-smart-thumbnails plugin, you can contact
   their support from them their.
    I’m marking this resolved since it wasn’t related
   to our plugin.
 * Best Regards
    Amin

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fbug-found-and-resolved%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/wp-smushit/assets/icon-256x256.gif?rev=3447113)
 * [Smush – Image Optimization, Compression, Lazy Load, WebP & CDN](https://wordpress.org/plugins/wp-smushit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-smushit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-smushit/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-smushit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-smushit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-smushit/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * Last activity: [5 days, 3 hours ago](https://wordpress.org/support/topic/bug-found-and-resolved/#post-19036166)
 * Status: resolved