Title: PHP warning about array keys
Last modified: July 10, 2024

---

# PHP warning about array keys

 *  Resolved [PeterBP](https://wordpress.org/support/users/peterbp/)
 * (@peterbp)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-warning-about-array-keys/)
 * I’ve noticed a warning in the error_log – this one tripped about 15000 times 
   in the past 9 hours and goes back possibly to the update I did on May 28, or 
   further.
 * [10-Jul-2024 02:56:17 UTC] PHP Warning: Undefined array key 4039 in /home/abcdef/
   public_html/wp-content/plugins/404-solution/includes/SpellChecker.php on line
   811
 * The key changes but everything else is the same.
 * WP 6.4.x
   PHP 8.1 EA404 Solutions 2.35.9
 * line 811 is: if (is_array($minDistances[$minDist])) {
 * I went to the plugin’s debug log and it threw a critical error.
   “GET /wp-admin/
   options-general.php?page=abj404_solution&subpage=abj404_debugfile HTTP/2” 500
 * I switched to PHP 8.0. & 7.4 and the 404 Solutions debug page is blank.
 * I found the log here [https://www.<<>>/wp-content/uploads/temp_abj404_solution/abj404_debug.txt](https://www.<<>>/wp-content/uploads/temp_abj404_solution/abj404_debug.txt)
   
   But despite edit timestamp being today, the last row is from November 2023:2023-
   11-03 11:41:47 AEDT (INFO): deleteOldRedirectsCron. Old captured URLs removed:
   22, Old automatic redirects removed: 0, Old manual redirects removed: 0, Old 
   log lines removed: 0, New log size: 100.03MB, Duplicate rows deleted: 0, Debug
   file size limited: false, Admin email notification option turned off., Permlink
   cache rows updated: 0, User initiated: false
 * Thanks for you plugin, it’s been very useful. Any idea about this one?

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

 *  Thread Starter [PeterBP](https://wordpress.org/support/users/peterbp/)
 * (@peterbp)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-warning-about-array-keys/#post-17880918)
 * Sorry I found the newer log file, here is a sample of the problem – which might
   be to do with really long base64 strings in the requested URLs, for all sorts
   of posts and pages.
 *     ```wp-block-code
       2024-07-10 12:56:20 AEST (ERROR): ABJ404-SOLUTION Normal error handler error: errno: 2, errstr: "Undefined array key 4014",errfile: "/home/abcdef/public_html/wp-content/plugins/404-solution/includes/SpellChecker.php",errline: 811, \nAdditional info: "Likely match IDs processing permalink: /pay-equity/the-pay-gap-what-can-you-do-about-it/, $wasntReadyCount: 0", mbstring: true, PHP version: 8.1.28, WP ver: 6.4.5, Plugin ver: 2.35.9, Referrer: , Requested URL: /events/the-vine-brisbane-july-2024/data:text/javascript;base64,dmFyIHdjcGFfZnJvbnQ9eyJhcGlfbm9uY2UiOm51bGwsInJvb3QiOiJodHRwczpcL1wvcGFybG91ci5vcmcuYXVcL3dwLWpzb25 ….….[omitted]….X3ByaWNlX2RlY2ltYWxzIjoiMiIsInByaWNlX2Zvcm1hdCI6IiUxJHMlMiRzIiwid2NfZGVjaW1hbF9zZXAiOiIuIiwid2NfY3VycmVuY3lfcG9zIjoibGVmdCIsIm1jX3VuaXQiOiIxIiwiYWRkb25zIjpbXSwidXBsb2FkX21ldGhvZCI6Im5vcm1hbCJ9,Stored debug messages:,Trace: #0 /home/abcdef/public_html/wp-content/plugins/404-solution/includes/ErrorHandler.php(89): ABJ_404_Solution_Logging->errorMessage('ABJ404-SOLUTION…') 1 /home/abcdef/public_html/wp-content/plugins/404-solution/includes/SpellChecker.php(811): ABJ_404_Solution_ErrorHandler::NormalErrorHandler(2, 'Undefined array…', '/home/abcdef/…', 811) 2 /home/abcdef/public_html/wp-content/plugins/404-solution/includes/SpellChecker.php(588): ABJ_404_Solution_SpellChecker->getLikelyMatchIDs('javascript;base…', 'events the vine…', 'pages') 3 /home/abcdef/public_html/wp-content/plugins/404-solution/includes/SpellChecker.php(405): ABJ_404_Solution_SpellChecker->matchOnPosts(Array, 'events/the-vine…', 'javascript;base…', 'events the vine…', 'pages') 4 /home/abcdef/public_html/wp-content/plugins/404-solution/includes/SpellChecker.php(314): ABJ_404_Solution_SpellChecker->findMatchingPosts('events/the-vine…', '1', '1') 5 /home/abcdef/public_html/wp-content/plugins/404-solution/includes/WordPress_Connector.php(277): ABJ_404_Solution_SpellChecker->getPermalinkUsingSpelling('events/the-vine…') 6 /home/abcdef/public_html/wp-content/plugins/404-solution/404-solution.php(139): ABJ_404_Solution_WordPress_Connector->process404() 7 /home/abcdef/public_html/wp-includes/class-wp-hook.php(324): abj404_404listener('') 8 /home/abcdef/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) 9 /home/abcdef/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 10 /home/abcdef/public_html/wp-includes/template-loader.php(13): do_action('template_redire…') 11 /home/abcdef/public_html/wp-blog-header.php(19): require_once('/home/abcdef/…') 12 /home/abcdef/public_html/index.php(17): require('/home/abcdef/…') 13 {main}
       ```
   
 *  Thread Starter [PeterBP](https://wordpress.org/support/users/peterbp/)
 * (@peterbp)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-warning-about-array-keys/#post-17880993)
 * All these weird mile-long URLs are from the Facebook crawler – according to useragent
   and IP. Not yet sure how that operates but stack overflow says it is not well
   behaved.
 * Useragent “facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.
   php)”
 *  Plugin Author [Aaron](https://wordpress.org/support/users/aaron13100/)
 * (@aaron13100)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-warning-about-array-keys/#post-17882042)
 * Thanks for letting me know about the warning messages.
 * I’ll try to get to this soon, but I’m traveling and don’t have my computer available
   to me at the moment.
 *  Thread Starter [PeterBP](https://wordpress.org/support/users/peterbp/)
 * (@peterbp)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/php-warning-about-array-keys/#post-17882551)
 * Thanks. No hurry. I’ve been able to sidestep the issue by moving the Facebook
   externalhit useragent to Internal User Agents in Options.
 *  Plugin Author [Aaron](https://wordpress.org/support/users/aaron13100/)
 * (@aaron13100)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/php-warning-about-array-keys/#post-17931534)
 * I’m sure you’ve forgotten about this, but I think I fixed this so I’ll go ahead
   and close the ticket.
 *  Thread Starter [PeterBP](https://wordpress.org/support/users/peterbp/)
 * (@peterbp)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/php-warning-about-array-keys/#post-17932734)
 * Thanks Aaron!

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

The topic ‘PHP warning about array keys’ is closed to new replies.

 * ![](https://ps.w.org/404-solution/assets/icon-256x256.jpg?rev=1610739)
 * [404 Solution](https://wordpress.org/plugins/404-solution/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/404-solution/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/404-solution/)
 * [Active Topics](https://wordpress.org/support/plugin/404-solution/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/404-solution/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/404-solution/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [PeterBP](https://wordpress.org/support/users/peterbp/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/php-warning-about-array-keys/#post-17932734)
 * Status: resolved