From a4ec80c48997bb8ec57484879e513ad5df977f16 Mon Sep 17 00:00:00 2001 From: meszarosrob Date: Fri, 26 Apr 2024 14:09:56 +0300 Subject: [PATCH] Fix condition for themes without license in the header --- src/MakePotCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MakePotCommand.php b/src/MakePotCommand.php index fea7bcd..affce87 100644 --- a/src/MakePotCommand.php +++ b/src/MakePotCommand.php @@ -902,7 +902,7 @@ protected function get_file_comment() { } if ( isset( $this->main_file_data['Theme Name'] ) ) { - if ( isset( $this->main_file_data['License'] ) ) { + if ( ! empty( $this->main_file_data['License'] ) ) { return sprintf( "Copyright (C) %1\$s %2\$s\nThis file is distributed under the %3\$s.", date( 'Y' ), // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date @@ -920,7 +920,7 @@ protected function get_file_comment() { } if ( isset( $this->main_file_data['Plugin Name'] ) ) { - if ( isset( $this->main_file_data['License'] ) && ! empty( $this->main_file_data['License'] ) ) { + if ( ! empty( $this->main_file_data['License'] ) ) { return sprintf( "Copyright (C) %1\$s %2\$s\nThis file is distributed under the %3\$s.", date( 'Y' ), // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date