Title: Two Uncaught TypeErrors
Last modified: April 2, 2022

---

# Two Uncaught TypeErrors

 *  Resolved [isarisar](https://wordpress.org/support/users/isarisar/)
 * (@isarisar)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/two-uncaught-typeerrors/)
 * Hi,
 * our WooCommerce log shows that the following two Uncaught TypeErrors can occur:
 *     ```
       CRITICAL Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, string given in /srv/wp-content/plugins/dhl-for-woocommerce/includes/pr-dhl-api/abstract-pr-dhl-api-soap.php:75
       Stack trace:
       #0 /srv/wp-content/plugins/dhl-for-woocommerce/includes/pr-dhl-api/abstract-pr-dhl-api-soap.php(75): round()
       #1 /srv/wp-content/plugins/dhl-for-woocommerce/includes/pr-dhl-api/class-pr-dhl-api-soap-label.php(925): PR_DHL_API_SOAP->maybe_convert_weight()
       #2 /srv/wp-content/plugins/dhl-for-woocommerce/includes/pr-dhl-api/class-pr-dhl-api-soap-label.php(65): PR_DHL_API_SOAP_Label->set_message()
       #3 /srv/wp-content/plugins/dhl-for-woocommerce/includes/pr-dhl-api/abstract-pr-dhl-api.php(37): PR_DHL_API_SOAP_Label->get_dhl_label()
       #4 /srv/wp-content/plugins/dhl-for-woocommerce/includes/pr-dhl-api/class-pr-dhl-api-paket.php(49): PR_DHL_API->get_dhl_label()
       #5 /srv/wp-content/plugins/dhl-for-woocommerce/includes/abstract-pr-dhl-wc-order.php(256): PR_DHL_API_Paket->get_dhl_label()
       #6 /srv/wp-includes/class-wp-hook.php(307): PR_DHL_WC_Order->save_meta_box_ajax()
       #7 /srv/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
       #8 /srv/wp-includes/plugin.php(474): WP_Hook->do_action()
       #9 /srv/wp-admin/admin-ajax.php(187): do_action()
       #10 {main}
         thrown in /srv/wp-content/plugins/dhl-for-woocommerce/includes/pr-dhl-api/abstract-pr-dhl-api-soap.php on line 75
   
   
       CRITICAL Uncaught TypeError: Cannot access offset of type string on string in /srv/wp-content/plugins/dhl-for-woocommerce/includes/class-pr-dhl-wc-order-paket.php:598
       Stack trace:
       #0 /srv/wp-content/plugins/dhl-for-woocommerce/includes/abstract-pr-dhl-wc-order.php(287): PR_DHL_WC_Order_Paket->delete_label_args()
       #1 /srv/wp-includes/class-wp-hook.php(307): PR_DHL_WC_Order->delete_label_ajax()
       #2 /srv/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
       #3 /srv/wp-includes/plugin.php(474): WP_Hook->do_action()
       #4 /srv/wp-admin/admin-ajax.php(187): do_action()
       #5 {main}
         thrown in /srv/wp-content/plugins/dhl-for-woocommerce/includes/class-pr-dhl-wc-order-paket.php on line 598
       ```
   
 * I’m not sure what was done in the backend to produce these errors.
 * The first log is from March 28, the second from March 31. Plugin version was 
   then 2.8.10 (or maybe .9). If this was fixed in 2.8.11, this report is moot ofc.
 * Other versions:
    WC: 6.3.1 WP: 5.9.2 PHP: 8.0.17

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

 *  [dhlsupport_yago](https://wordpress.org/support/users/shevasa/)
 * (@shevasa)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/two-uncaught-typeerrors/#post-15523642)
 * Hi [@isarisar](https://wordpress.org/support/users/isarisar/)!
 * We are sorry you are facing some issues with the WooCommerce DHL plugin.
 * Could you please describe what was the trigger for these errors? What had you
   done before these errors appeared?
 * Thanks,
    Ilya
 *  Thread Starter [isarisar](https://wordpress.org/support/users/isarisar/)
 * (@isarisar)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/two-uncaught-typeerrors/#post-15524542)
 * Unfortunately I don’t know, my colleagues didn’t report the occurrences. I just
   saw them later in the log.
 * (We don’t have anything DHL-related in our functions.php, that much I know.)
 * Seems like somewhere a string isn’t parsed into a number, which used to be accepted
   implicitly with but a warning up to & including PHP7.
 *  [dhlsupport_yago](https://wordpress.org/support/users/shevasa/)
 * (@shevasa)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/two-uncaught-typeerrors/#post-15524807)
 * [@isarisar](https://wordpress.org/support/users/isarisar/) Thanks for your reply!
 * In order to fix the issue, we need to know how to recreate this issue on our 
   end. I think that the best way to deal with this problem is that in case you 
   get this error again, please let us know about it, describing the sequence of
   steps we should take to get the same error on our end!
 * Please let me know if that makes sense to you!
 *  Thread Starter [isarisar](https://wordpress.org/support/users/isarisar/)
 * (@isarisar)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/two-uncaught-typeerrors/#post-15524878)
 * It does. Could take ages, though. (Also, it’s probably two issues.)
 *  [dhlsupport_yago](https://wordpress.org/support/users/shevasa/)
 * (@shevasa)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/two-uncaught-typeerrors/#post-15528692)
 * [@isarisar](https://wordpress.org/support/users/isarisar/) I understand!
 * But recreating the problem on our end is the only way we can deal with the errors,
   otherwise, it is just pointing a finger at the sky!
 * Please let me know if you have any questions

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

The topic ‘Two Uncaught TypeErrors’ is closed to new replies.

 * ![](https://ps.w.org/dhl-for-woocommerce/assets/icon.svg?rev=1777040)
 * [DHL Shipping Germany for WooCommerce](https://wordpress.org/plugins/dhl-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/dhl-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/dhl-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dhl-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dhl-for-woocommerce/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [dhlsupport_yago](https://wordpress.org/support/users/shevasa/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/two-uncaught-typeerrors/#post-15528692)
 * Status: resolved