# imagify/trunk/patches/wordpress/mcp-adapter/fix-static-trait-call.patch

Imagify Image Optimization: Optimize Images | Compress &amp; Convert to WebP/AVIF, version trunk. 22 lines.

- Page: https://pluginprobe.com/plugins/imagify/trunk/code/patches/wordpress/mcp-adapter/fix-static-trait-call.patch
- Raw: https://pluginprobe.com/plugins/imagify/trunk/raw/patches/wordpress/mcp-adapter/fix-static-trait-call.patch
- Modified: 2026-07-08T07:25:08+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/imagify/trunk/code/patches/wordpress/mcp-adapter/fix-static-trait-call.patch#L10-L20`.

```diff
--- a/includes/Transport/Infrastructure/RequestRouter.php
+++ b/includes/Transport/Infrastructure/RequestRouter.php
@@ -10,7 +10,7 @@
 namespace WP\MCP\Transport\Infrastructure;

 use WP\MCP\Infrastructure\ErrorHandling\McpErrorFactory;
-use WP\MCP\Infrastructure\Observability\McpObservabilityHelperTrait;
+use WP\MCP\Infrastructure\Observability\ErrorLogMcpObservabilityHandler;
 use WP\McpSchema\Common\AbstractDataTransferObject;
 use WP\McpSchema\Common\Content\DTO\TextContent;
 use WP\McpSchema\Common\JsonRpc\DTO\JSONRPCErrorResponse;
@@ -289,7 +289,8 @@
 			// Filter argument keys to exclude sensitive-looking ones.
 			$safe_keys = array();
 			foreach ( array_keys( $params['arguments'] ) as $arg_key ) {
-				if ( McpObservabilityHelperTrait::is_sensitive_key( (string) $arg_key ) ) {
+				// @todo Replace this with a less-coupled way to access `McpObservabilityHelperTrait:is_sensitive_key()`.
+				if ( ErrorLogMcpObservabilityHandler::is_sensitive_key( (string) $arg_key ) ) {
 					$safe_keys[] = '[REDACTED]';
 				} else {
 					$safe_keys[] = $arg_key;

```
