rhubarbgroup / redis-cache

A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.
https://wordpress.org/plugins/redis-cache/
GNU General Public License v3.0
425 stars 148 forks source link

Potential bug in `show_error_and_die()` #502

Closed tillkruss closed 6 months ago

tillkruss commented 6 months ago
[21-Feb-2024 18:09:26 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function get_template_directory() in wp-includes/l10n.php:1306
Stack trace:
#0 wp-includes/l10n.php(1331): _load_textdomain_just_in_time()
#1 wp-includes/l10n.php(185): get_translations_for_domain()
#2 wp-includes/l10n.php(297): translate()
#3 wp-content/object-cache.php(2914): __()
#4 wp-content/object-cache.php(2886): WP_Object_Cache->show_error_and_die()
#5 wp-content/object-cache.php(566): WP_Object_Cache->handle_exception()
#6 wp-content/object-cache.php(256): WP_Object_Cache->__construct()
#7 wp-includes/load.php(856): wp_cache_init()
#8 wp-settings.php(131): wp_start_object_cache()
#9 wp-config.php(120): require_once('...')
#10 wp-load.php(50): require_once('...')
#11 wp-blog-header.php(13): require_once('...')
#12 index.php(17): require('...')
#13 {main}
  thrown in wp-includes/l10n.php on line 1306
tillkruss commented 6 months ago

@yatsukhnenko: Can you try this 399664183c7f09e05dff12ac8d37cc8fb6b2030d?

You need to throw an exception in wp_cache_init() and set WordPress to Ukranian under "Setting > General" and make sure the language packs are downloaded.