Skip to content

Commit 8d88875

Browse files
gzioloclaude
andcommitted
Connectors: Remove unnecessary null coalescing for authentication method.
The `method` key is always present in the defaults array, so the `?? ''` fallback is not needed. See #64957. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5111bb3 commit 8d88875

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/connectors.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ function _wp_connectors_register_default_ai_providers( WP_Connector_Registry $re
343343

344344
// Register all default connectors directly on the registry.
345345
foreach ( $defaults as $id => $args ) {
346-
if ( 'api_key' === ( $args['authentication']['method'] ?? '' ) ) {
346+
if ( 'api_key' === $args['authentication']['method'] ) {
347347
$sanitized_id = str_replace( '-', '_', $id );
348348

349349
if ( ! isset( $args['authentication']['setting_name'] ) ) {

0 commit comments

Comments
 (0)