Title: Php error
Last modified: April 19, 2023

---

# Php error

 *  Resolved [jendeh](https://wordpress.org/support/users/jendeh/)
 * (@jendeh)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/php-error-589/)
 * Hi, I am getting this php error. (I am on a litespeed host and not using any 
   other caching plugin).
 * PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array)
   must be of type array, bool given in /home/v..mv/public_html/wp-content/advanced-
   cache.php:258
   Stack trace:
 * **0 /home/v..mv/public_html/wp-content/advanced-cache.php(219): swcfpc_fallback_cache_remove_url_parameters()**
 * **1 /home/v..mv/public_html/wp-content/advanced-cache.php(14): swcfpc_fallback_cache_get_current_page_cache_key()**
 * **2 /home/v..mv/public_html/wp-settings.php(95): include(‘/home/v..mv/pu…’)**
 * **3 /home/v..mv/public_html/wp-config.php(108): require_once(‘/home/v..mv/pu…’)**
 * **4 /home/v..mv/public_html/wp-load.php(50): require_once(‘/home/v..mv/pu…’)**
 * **5 /home/v..mv/public_html/wp-blog-header.php(13): require_once(‘/home/v..mv/
   pu…’)**
 * **6 /home/v..mv/public_html/index.php(17): require(‘/home/v..mv/pu…’)**
 * **7 {main}**
 * thrown in /home/v..mv/public_html/wp-content/advanced-cache.php on line 258
 * The headers looks fine and caching works, cloudflare is usually HIT. Any suggestions,
   what should I do?

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

 *  Plugin Contributor [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/php-error-589/#post-16671557)
 * Hi [@jendeh](https://wordpress.org/support/users/jendeh/),
   Seems wired. Cause
   it seems that the URL that is being accessed is a wrong URL as the PHP `parse_url()`
   function is not able to parse it. You can also try disabling the page cache from
   the plugin settings and reenabling it to see if it fixes. Otherwise if you know
   for which URL that issue is happening, please share the URL.
 *  Thread Starter [jendeh](https://wordpress.org/support/users/jendeh/)
 * (@jendeh)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/php-error-589/#post-16671613)
 * Thank you so much for your reply. It is not denoting any specific url. This is
   what is at 258 line in advanced cache file
 *     ```wp-block-code
       if( array_key_exists( 'query', $url_parsed ) ) {
   
               if( $url_parsed[ 'query' ] === '' ) {
   
                   // this means the URL ends with just ? i.e. /example-page/? - so just remove the last character ? from the URL
   
                   $url = substr( trim( $url ), 0, -1 );
   
               } else {
   
                   // Set the ignored query param array
   
                   $ignored_query_params = [
   
                       'Browser',
   
                       'C',
   
                       'GCCON',
   
                       'MCMP',
   
                       'MarketPlace',
   
                       'PD',
       ```
   
 * The error appeared once yesterday, haven’t seen it again.
 * The headers look fine.
    -  This reply was modified 3 years, 1 month ago by [jendeh](https://wordpress.org/support/users/jendeh/).
 *  Plugin Contributor [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/php-error-589/#post-16671620)
 * Hi [@jendeh](https://wordpress.org/support/users/jendeh/),
   I have already checked
   the code before replying you. But the thing is `$url_parsed` should always be
   an Array after `parse_url()` is executed. So, this error should never happen.
 * It might be possible that some bot tried to access the site with some malformed
   URL which caused this issue, I think you can safely ignore it.
 *  Thread Starter [jendeh](https://wordpress.org/support/users/jendeh/)
 * (@jendeh)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/php-error-589/#post-16671630)
 * Got it, thank you so much!!

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

The topic ‘Php error’ is closed to new replies.

 * ![](https://ps.w.org/wp-cloudflare-page-cache/assets/icon-256x256.gif?rev=3234997)
 * [Super Page Cache – Cloudflare Cache, Page Speed & Core Web Vitals](https://wordpress.org/plugins/wp-cloudflare-page-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-cloudflare-page-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [jendeh](https://wordpress.org/support/users/jendeh/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/php-error-589/#post-16671630)
 * Status: resolved