ArgumentCountError: array_intersect() expects at least 1 argument, 0 given
-
The following error occurred on several of my sites when I clicked the
Save & Optimize
button or theRefresh Cache (and maintain settings)
link.[07-Dec-2022 23:49:19 UTC] PHP Fatal error: Uncaught ArgumentCountError: array_intersect() expects at least 1 argument, 0 given in ROOT/wp-content/plugins/host-webfonts-local/includes/class-omgf.php:496 Stack trace: #0 ROOT/wp-content/plugins/host-webfonts-local/includes/class-omgf.php(496): array_intersect() #1 ROOT/wp-content/plugins/host-webfonts-local/includes/optimize/class-run.php(111): OMGF::available_used_subsets() #2 ROOT/wp-content/plugins/host-webfonts-local/includes/optimize/class-run.php(50): OMGF_Optimize_Run->optimization_succeeded() #3 ROOT/wp-content/plugins/host-webfonts-local/includes/optimize/class-run.php(33): OMGF_Optimize_Run->run() #4 ROOT/wp-content/plugins/host-webfonts-local/includes/admin/class-optimize.php(89): OMGF_Optimize_Run->__construct() #5 ROOT/wp-content/plugins/host-webfonts-local/includes/admin/class-optimize.php(63): OMGF_Admin_Optimize->run() #6 ROOT/wp-content/plugins/host-webfonts-local/includes/admin/class-optimize.php(39): OMGF_Admin_Optimize->init() #7 ROOT/wp-content/plugins/host-webfonts-local/includes/class-omgf.php(239): OMGF_Admin_Optimize->__construct() #8 ROOT/wp-includes/class-wp-hook.php(308): OMGF->do_optimize() #9 ROOT/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #10 ROOT/wp-includes/plugin.php(517): WP_Hook->do_action() #11 ROOT/wp-admin/admin.php(175): do_action() #12 ROOT/wp-admin/options-general.php(10): require_once('ROOT...') #13 {main} thrown in ROOT/wp-content/plugins/host-webfonts-local/includes/class-omgf.php on line 496
It seems that this is related to having no
Used Subset(s)
selected on the Advanced Settings tab. Once a subset is selected and the cache directory is emptied, optimisation works.Looks like the update isn’t copying the existing subset selection into the new setting, and this causes the error. This is strange, because when the plugin is configured to perform automatic subset selection, that setting shouldn’t even be considered.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘ArgumentCountError: array_intersect() expects at least 1 argument, 0 given’ is closed to new replies.