Skip to content

Commit a10e10f

Browse files
committed
Add a null check before trying to read what error was detected.
Fixes #29.
1 parent 72be4e7 commit a10e10f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

class-jquery-migrate-helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public static function fatal_error_handler() {
286286
var erroredFunction = msg.match( match_pattern );
287287

288288
// If there was no matching functions, do not try to downgrade.
289-
if ( typeof erroredFunction !== 'object' || typeof erroredFunction[1] === "undefined" || -1 === jQueryFunctions.indexOf( erroredFunction[1] ) ) {
289+
if ( null === erroredFunction || typeof erroredFunction !== 'object' || typeof erroredFunction[1] === "undefined" || -1 === jQueryFunctions.indexOf( erroredFunction[1] ) ) {
290290
return true;
291291
}
292292

0 commit comments

Comments
 (0)