| @@ -115,13 +115,13 @@ | ||
| 115 | 115 | { |
| 116 | 116 | $basename = basename($wpConfigPath); |
| 117 | 117 | |
| 118 | 118 | if (!file_exists($wpConfigPath)) { |
| 119 | - throw new WPConfigFileNotFoundException("{$basename} does not exist."); // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- JSON-RPC error payload, JSON-encoded on output, never rendered as HTML; escaping here would corrupt message bytes | |
| 119 | + throw new WPConfigFileNotFoundException("{$basename} does not exist."); | |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | if (!wp_is_writable($wpConfigPath)) { |
| 123 | - throw new WPConfigFileNotWritableException("{$basename} is not writable."); // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- JSON-RPC error payload, JSON-encoded on output, never rendered as HTML; escaping here would corrupt message bytes | |
| 123 | + throw new WPConfigFileNotWritableException("{$basename} is not writable."); | |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | $this->wpConfigPath = $wpConfigPath; |
| 127 | 127 | } |
| @@ -149,9 +149,9 @@ | ||
| 149 | 149 | $this->wpConfigSrc = str_replace(["\n\r", "\r"], "\n", $wpConfigSrc); |
| 150 | 150 | $this->wpConfigs = $this->parseWpConfig($this->wpConfigSrc); |
| 151 | 151 | |
| 152 | 152 | if (!isset($this->wpConfigs[$type])) { |
| 153 | - throw new WPConfigInvalidTypeException("Config type '{$type}' does not exist."); // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- JSON-RPC error payload, JSON-encoded on output, never rendered as HTML; escaping here would corrupt message bytes | |
| 153 | + throw new WPConfigInvalidTypeException("Config type '{$type}' does not exist."); | |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | return isset($this->wpConfigs[$type][$name]); |
| 157 | 157 | } |
| @@ -355,9 +355,9 @@ | ||
| 355 | 355 | $placeholder = "define( '%s', %s );"; |
| 356 | 356 | } elseif ('variable' === $type) { |
| 357 | 357 | $placeholder = '$%s = %s;'; |
| 358 | 358 | } else { |
| 359 | - throw new WPConfigNormalizationException("Unable to normalize config type '{$type}'."); // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- JSON-RPC error payload, JSON-encoded on output, never rendered as HTML; escaping here would corrupt message bytes | |
| 359 | + throw new WPConfigNormalizationException("Unable to normalize config type '{$type}'."); | |
| 360 | 360 | } |
| 361 | 361 | |
| 362 | 362 | return sprintf($placeholder, $name, $value); |
| 363 | 363 | } |