Skip to content

Commit de8ca07

Browse files
committed
updated: use null coalescing operator for landmark and landmark_selector in violation handling
1 parent 065b064 commit de8ca07

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

includes/classes/class-rest-api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,8 @@ public function set_post_scan_results( $request ) {
380380
*/
381381
do_action( 'edac_before_rule', $post_id, $actual_rule_id, 'js' );
382382

383-
$landmark = isset( $violation['landmark'] ) ? $violation['landmark'] : null;
384-
$landmark_selector = isset( $violation['landmarkSelector'] ) ? $violation['landmarkSelector'] : null;
383+
$landmark = $violation['landmark'] ?? null;
384+
$landmark_selector = $violation['landmarkSelector'] ?? null;
385385

386386
( new Insert_Rule_Data() )->insert( $post, $actual_rule_id, $impact, $html, $landmark, $landmark_selector );
387387

0 commit comments

Comments
 (0)