run:R W Run
DIR
2026-04-09 18:51:36
R W Run
DIR
2026-04-09 18:51:36
R W Run
DIR
2026-04-09 18:51:36
R W Run
42.31 KB
2026-04-09 18:51:36
R W Run
14.57 KB
2026-04-09 18:51:36
R W Run
1.09 KB
2026-04-09 18:51:36
R W Run
19.59 KB
2026-04-09 18:51:36
R W Run
3.33 KB
2026-04-09 18:51:36
R W Run
2.5 KB
2026-04-09 18:51:36
R W Run
2.42 KB
2026-04-09 18:51:36
R W Run
324 By
2026-04-09 18:51:36
R W Run
2.55 KB
2026-04-09 18:51:36
R W Run
error_log
📄bootstrap.php
1<?php
2/**
3 * Copyright © 2019-2026 Rhubarb Tech Inc. All Rights Reserved.
4 *
5 * The Object Cache Pro Software and its related materials are property and confidential
6 * information of Rhubarb Tech Inc. Any reproduction, use, distribution, or exploitation
7 * of the Object Cache Pro Software and its related materials, in whole or in part,
8 * is strictly forbidden unless prior permission is obtained from Rhubarb Tech Inc.
9 *
10 * In addition, any reproduction, use, distribution, or exploitation of the Object Cache Pro
11 * Software and its related materials, in whole or in part, is subject to the End-User License
12 * Agreement accessible in the included `LICENSE` file, or at: https://objectcache.pro/eula
13 */
14
15declare(strict_types=1);
16
17namespace RedisCachePro;
18
19use RedisCachePro\Configuration\Configuration;
20
21defined('ABSPATH') || exit;
22
23spl_autoload_register(function ($fqcn) {
24 if (strpos($fqcn, 'RedisCachePro\\') === 0) {
25 require_once str_replace(['\\', 'RedisCachePro/'], ['/', __DIR__ . '/src/'], $fqcn) . '.php';
26 }
27});
28
29(function ($config) {
30 if (defined('WP_REDIS_CONFIG') || empty($config)) {
31 return;
32 }
33
34 $config = json_decode((string) $config, true);
35 $error = json_last_error();
36
37 if ($error !== JSON_ERROR_NONE || ! is_array($config)) {
38 log('warning', sprintf(
39 'Unable to decode `OBJECTCACHE_CONFIG` environment variable (%s)',
40 json_last_error_msg()
41 ));
42
43 return;
44 }
45
46 $array_replace_recursive = function ($current, $override) use (&$array_replace_recursive) {
47 foreach ($override as $key => $value) {
48 if (array_key_exists($key, $current) && is_array($current[$key]) && $current[$key] !== array_values($current[$key])) {
49 $current[$key] = $array_replace_recursive($current[$key], $value);
50 } else {
51 $current[$key] = $value;
52 }
53 }
54
55 return $current;
56 };
57
58 $array_merge_recursive = function ($current, $merge) use (&$array_merge_recursive) {
59 foreach ($merge as $key => $value) {
60 if (! array_key_exists($key, $current) || ! is_array($current[$key])) {
61 $current[$key] = $value;
62 } elseif ($current[$key] === array_values($current[$key])) {
63 $current[$key] = array_merge($current[$key], (array) $value);
64 } else {
65 $current[$key] = $array_merge_recursive($current[$key], $value);
66 }
67 }
68
69 return $current;
70 };
71
72 if (defined('OBJECTCACHE_OVERRIDE')) {
73 $config = $array_replace_recursive($config, OBJECTCACHE_OVERRIDE);
74 } elseif (defined('OBJECTCACHE_MERGE')) {
75 $config = $array_merge_recursive($config, OBJECTCACHE_MERGE);
76 }
77
78 define('WP_REDIS_CONFIG', $config);
79})(getenv('OBJECTCACHE_CONFIG'));
80
81if (! function_exists(__NAMESPACE__ . '\log')) :
82 /**
83 * Log a message to `error_log()` and try to respect the configured log levels.
84 *
85 * @param string $level
86 * @param string $message
87 * @return void
88 */
89 function log($level, $message)
90 {
91 $config = Configuration::safelyFrom(
92 defined('WP_REDIS_CONFIG') ? WP_REDIS_CONFIG : []
93 );
94
95 if ($config->log_levels && ! \in_array($level, $config->log_levels)) {
96 return;
97 }
98
99 \error_log("objectcache.{$level}: {$message}");
100 }
101endif;
102