Call to undefined function wp_rand()
-
Great Plugin!
Versions:
Redis Cache 2.6.0
WordPress 6.8.2
PHP 8.1.2
After a recent update, I am seeing plenty errors about a missing function. I have flushed the cache but no change. As soon as I disable the cache the errors disappear:
[Tue Jul 22 19:26:17.970812 2025] [proxy_fcgi:error] [pid 1342838:tid 140482165376576] [remote 1.2.3.4:58364] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined function Rhubarb\RedisCache\wp_rand() in /var/www/xxxxxxx.com/wp-content/plugins/redis-cache/includes/class-metrics.php:149\nStack trace:\n#0 /var/www/xxxxxxx.com/wp-content/plugins/redis-cache/includes/class-metrics.php(137): Rhubarb\RedisCache\Metrics->collect()\n#1 /var/www/xxxxxxx.com/wp-includes/class-wp-hook.php(324): Rhubarb\RedisCache\Metrics::record()\n#2 /var/www/xxxxxxx.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()\n#3 /var/www/xxxxxxx.com/wp-includes/plugin.php(517): WP_Hook->do_action()\n#4 /var/www/xxxxxxx.com/wp-includes/load.php(1304): do_action()\n#5 [internal function]: shutdown_action_hook()\n#6 {main}\n thrown in /var/www/xxxxxxx.com/wp-content/plugins/redis-cache/includes/class-metrics.php on line 149
The topic ‘Call to undefined function wp_rand()’ is closed to new replies.