legacyPluginLogicDebugMode(); if ($legacyDebugMode !== null) { return $legacyDebugMode; } // Raw read only via the recursion-safe logging state store. isDebug() // is on the logging write path; reading via getOptions() runs the // normalize pipeline, which logs on validation failure and re-enters // logging -- the 4.3.0 logging<->options OOM. The store reads debug_mode // with the raw, non-normalizing, non-logging accessor. $store = abj_service_optional('logging_state_store'); if (is_object($store) && method_exists($store, 'isDebugMode')) { return $store->isDebugMode(); } return false; } /** @return bool|null */ private function legacyPluginLogicDebugMode(): ?bool { if (!class_exists('ABJ_404_Solution_PluginLogic', false)) { return null; } $pluginLogic = ABJ_404_Solution_PluginLogic::peekInstance(); if (!is_object($pluginLogic)) { return null; } try { $optionsProperty = new ReflectionProperty('ABJ_404_Solution_PluginLogic', 'options'); $options = $optionsProperty->getValue($pluginLogic); if (is_array($options) && array_key_exists('debug_mode', $options)) { return $options['debug_mode'] == true; } } catch (\Throwable $e) { abj404_logPhpFallback( 'logger-internal', 'could not inspect PluginLogic debug_mode override: ' . $e->getMessage() ); } return null; } }