Title: Errors in fatal_error_handler
Last modified: July 20, 2023

---

# Errors in fatal_error_handler

 *  Resolved [Malae](https://wordpress.org/support/users/malae/)
 * (@malae)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/errors-in-fatal_error_handler-2/)
 * **Errors in fatal_error_handler** was posted 2 years and 5 months ago by [Marcus Downing](https://wordpress.org/support/users/marcusdowning/)(
   @marcusdowning)
   I think the fatal_error_handler code is incorrect.This registers
   a global error handler, with `window.onerror = function...`. The handler attempts
   to match the wording of the error, looking for deprecated jQuery functions.
 * It uses `msg.match()`, which returns either null or an array, but the code to
   check for results says:
   `if ( typeof erroredFunction !== 'object' || typeof erroredFunction[
   1] === "undefined" || -1 === jQueryFunctions.indexOf( erroredFunction[1] ) ) {
   return true;}
 * This doesn’t work when the result is null because `typeof null === "object"` 
   in JavaScript.
 * and also a solution from [Benjamin Danon](https://wordpress.org/support/users/bndn/)(
   @bndn)
   This error is [reported on Github too](https://github.com/WordPress/jquery-migrate-helper/issues/29).
   We have to add a condition to the line 289 of wp-content/plugins/enable-jquery-
   migrate-helper/class-jquery-migrate-helper.php to fix it:
 * `if ( erroredFunction === null || typeof erroredFunction !== 'object' || typeof
   erroredFunction[1] === "undefined" || -1 === jQueryFunctions.indexOf( erroredFunction[
   1] ) ) {`
 * It seems to work, but does not appear to have been implemented , or answered.
   
   I am still getting the error in the Firefox Console:`Uncaught TypeError: erroredFunction
   is null`Am I missing something?

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

 *  [Felipe Velzani](https://wordpress.org/support/users/felipevelzani/)
 * (@felipevelzani)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/errors-in-fatal_error_handler-2/#post-16911051)
 * Hi there!
 * > It seems to work, but does not appear to have been implemented , or answered.
 * I believe you’re referring to [this thread](https://wordpress.org/support/topic/errors-in-fatal_error_handler/?view=all),
   right?
 * I see the issue that you linked yourself is closed as solved. Can you confirm
   when you started having this error? Also, can you confirm your Enable jQuery 
   Migrate Helper plugin version?
 *  Thread Starter [Malae](https://wordpress.org/support/users/malae/)
 * (@malae)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/errors-in-fatal_error_handler-2/#post-16911210)
 * Hello Felipe,
 * Thank you for your reply. Yes, that is the thread to which that I was referring.
   It has notations: **_Status: not resolved_**_. __The topic ‘Errors in fatal\_error\
   _handler’  is closed to new replies._
 * I presumably have always had this error, but had some other issues on a site 
   and wanted to clean up as many errors as possible that were showing in the console.
   It is showing on all sites using the plugin and on other browsers:  Chrome and
   Edge.
 *  I have WordPress  6.2.2 and Enable jQuery Migrate Helper version 1.3.0 with 
   PHP 8.0.28.
 * If I open `class-jquery-migrate-helper.php` line 289 in this version:
   `if ( typeof
   erroredFunction !== 'object' || typeof erroredFunction[1] === "undefined" || -
   1 === jQueryFunctions.indexOf( erroredFunction[1] ) ) {`
 * This appears not to have changed from that shown in the above referenced thread
   more than two years ago.
 *  [Felipe Velzani](https://wordpress.org/support/users/felipevelzani/)
 * (@felipevelzani)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/errors-in-fatal_error_handler-2/#post-16918935)
 * Oh, I see your point. Thank you for clarifying that!
 * It looks like the version from GitHub wasn’t moved to WordPress.org. I’ll contact
   the appropriate team to move this update and release a new version.
 * For now, you can update this from GitHub directly — this project doesn’t seem
   to have dependencies, so you can try downloading from trunk: [https://github.com/WordPress/jquery-migrate-helper/archive/refs/heads/trunk.zip](https://github.com/WordPress/jquery-migrate-helper/archive/refs/heads/trunk.zip)
 *  Thread Starter [Malae](https://wordpress.org/support/users/malae/)
 * (@malae)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/errors-in-fatal_error_handler-2/#post-16923087)
 * Thanks, I had applied the suggested fix on some sites, but using the file from
   link will make it easier. I presume at some point the WordPress repository will
   be updated.
 *  Moderator [jordesign](https://wordpress.org/support/users/jordesign/)
 * (@jordesign)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/errors-in-fatal_error_handler-2/#post-16925919)
 * Hey [@malae](https://wordpress.org/support/users/malae/) – yes that’s correct.
   The developer has been notified now and I’d expect an update to be rolled out
   🙂

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

The topic ‘Errors in fatal_error_handler’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/enable-jquery-migrate-helper.svg)
 * [Enable jQuery Migrate Helper](https://wordpress.org/plugins/enable-jquery-migrate-helper/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/enable-jquery-migrate-helper/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/enable-jquery-migrate-helper/)
 * [Active Topics](https://wordpress.org/support/plugin/enable-jquery-migrate-helper/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/enable-jquery-migrate-helper/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/enable-jquery-migrate-helper/reviews/)

## Tags

 * [typeerror](https://wordpress.org/support/topic-tag/typeerror/)

 * 5 replies
 * 3 participants
 * Last reply from: [jordesign](https://wordpress.org/support/users/jordesign/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/errors-in-fatal_error_handler-2/#post-16925919)
 * Status: resolved