diff --git a/backend/functions.php b/backend/functions.php index 2a7a63e5..2050e736 100644 --- a/backend/functions.php +++ b/backend/functions.php @@ -11,6 +11,16 @@ use Firebase\JWT\BeforeValidException; $INTERNAL_KEY = function_exists('getInternalSocketKey') ? getInternalSocketKey() : ''; +/** + * Helper to get the global Redis connection defined in bootstrap.php + */ +if (!function_exists('getRedisConnection')) { + function getRedisConnection() { + global $redis; + return $redis; + } +} + /** * دالة البحث الهجين (Redis + MySQL) * @param $redis Client : اتصال الريدز