From e0b8653ebd96c597f4293e96bdcd4424b0dbf7c4 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Tue, 9 Sep 2025 14:35:08 +1000 Subject: [PATCH] Title Check: Avoid Deprecated warnings when there's no file contents. --- checks/class-title-check.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/checks/class-title-check.php b/checks/class-title-check.php index 2d7bae69..b09c24b0 100644 --- a/checks/class-title-check.php +++ b/checks/class-title-check.php @@ -29,10 +29,12 @@ class Title_Check implements themecheck { */ public function check( $php_files, $css_files, $other_files ) { - $php = implode( ' ', $php_files ); - foreach ( $php_files as $file_path => $file_content ) { + if ( empty( $file_content ) ) { + continue; + } + // Check whether there is a call to wp_title(). checkcount(); if ( preg_match( '/\bwp_title\b/', $file_content ) ) {