litespeedtech / litespeedtech/lscache_wp
Crawler Settings error notice: Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 257
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
Hey. Got this error on a single on of my WP 6.4 sites on the same host.. PHP 8.1:
`Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in /home/removed/wp-content/plugins/litespeed-cache/src/crawler.cls.php:100 Stack trace: #0 /home/removed/wp-content/plugins/litespeed-cache/src/crawler.cls.php(100): in_array() #1 /home/removed/wp-content/plugins/litespeed-cache/tpl/crawler/summary.tpl.php(169): LiteSpeed\Crawler->is_active() #2 /home/removed/wp-content/plugins/litespeed-cache/tpl/crawler/entry.tpl.php(44): require('/home/sustain2/...') #3 /home/removed/wp-content/plugins/litespeed-cache/src/admin-display.cls.php(658): require_once('/home/sustain2/...') #4 /home/removed/wp-includes/class-wp-hook.php(324): LiteSpeed\Admin_Display->show_crawler() #5 /home/removed/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #6 /home/removed/wp-includes/plugin.php(517): WP_Hook->do_action() #7 /home/removed/wp-admin/admin.php(259): do_action() #8 {main} thrown in /home/removed/wp-content/plugins/litespeed-cache/src/crawler.cls.php on line 100
There has been a critical error on this website. Please check your site admin email inbox for instructions.`
Can't say if it's something regarding the install, but I've tried:
- disabled all other plugins
- reset LiteSpeed plugin settings.
- uninstalled LiteSpeed plugin and reinstalled.
Any hints would be appreciated; I hate having an error like that linger even though I don't really need the crawler.

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/crawler.cls.php:100 and trace the value passed to in_array() when the Crawler Settings page reaches LiteSpeed\Crawler->is_active(). Reproduce on WordPress 6.4 with PHP 8.1, using the related calls in tpl/crawler/summary.tpl.php and src/admin-display.cls.php as entry points; done means the page no longer throws the reported TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100