Title: Help w/debugging?
Last modified: February 28, 2023

---

# Help w/debugging?

 *  [kendalinas](https://wordpress.org/support/users/kendalinas/)
 * (@kendalinas)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/help-w-debugging/)
 * Hello! I am new here. This shows up on my published site, would like to remove
   it. Thank you
 * **Warning**: usort() expects parameter 2 to be a valid callback, function ‘date_compare’
   not found or invalid function name in **/home/customer/www/uhwa.org/public_html/
   wp-content/plugins/insert-php-code-snippet/shortcode-handler.php(99) : eval()’
   d code** on line **8**
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhelp-w-debugging%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [Sruthy@xyzscripts](https://wordpress.org/support/users/sruthyxyz/)
 * (@sruthyxyz)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/help-w-debugging/#post-16517461)
 * Hi,
 * The error message “Warning: usort() expects parameter 2 to be a valid callback,
   function ‘date_compare’ not found or invalid function name” indicates that there
   is an issue with the second parameter passed to the usort() function.
 * The usort() function is used to sort an array using a user-defined comparison
   function. The second parameter of the usort() function should be a valid callback
   function that can be used to compare the elements of the array.
 * In this case, the error message suggests that the function named “date_compare”
   is either not defined or has an invalid function name.
 * To resolve this error, you need to make sure that the function named “date_compare”
   is defined and has a valid function name. You should check the spelling of the
   function name and make sure that the function is defined in the correct file 
   and in the correct scope.
 * You should also ensure that the function is properly defined as a callback function.
   A valid callback function must accept two parameters and return an integer value
   that represents the result of the comparison between the two parameters.

Viewing 1 replies (of 1 total)

The topic ‘Help w/debugging?’ is closed to new replies.

 * ![](https://ps.w.org/insert-php-code-snippet/assets/icon-128x128.png?rev=1800967)
 * [Insert PHP Code Snippet](https://wordpress.org/plugins/insert-php-code-snippet/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php-code-snippet/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php-code-snippet/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php-code-snippet/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php-code-snippet/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php-code-snippet/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Sruthy@xyzscripts](https://wordpress.org/support/users/sruthyxyz/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/help-w-debugging/#post-16517461)
 * Status: not resolved