Skip to content

Commit

Permalink
move up early exit
Browse files Browse the repository at this point in the history
  • Loading branch information
afragen committed Sep 18, 2023
1 parent 846913a commit db8e90e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Git_Updater/REST/Rest_Upgrader_Skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,17 @@ public function feedback( $message, ...$args ) {
$string = $this->upgrader->strings[ $message ];
}

if ( empty( $string ) ) {
return;
}

if ( str_contains( $string, '%' ) ) {
if ( $args ) {
$args = array_map( 'strip_tags', $args );
$args = array_map( 'esc_html', $args );
$string = vsprintf( $string, $args );
}
}
if ( empty( $string ) ) {
return;
}

$this->messages[] = $string;
}
Expand Down

0 comments on commit db8e90e

Please sign in to comment.