Skip to content

Commit 219a1cc

Browse files
authored
Merge pull request #440 from Codeinwp/fix/issue-436
Fixed php deprecation warning with PHP 8.2 and above
2 parents c7c4847 + 678c786 commit 219a1cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

includes/WP_Cli.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function import( $args, $assoc_args ) {
147147
$sites = $this->get_all_sites();
148148
$site_slug = $args[0];
149149
if ( ! array_key_exists( $site_slug, $sites ) ) {
150-
\WP_CLI::warning( "No site to import with the slug ${site_slug}." );
150+
\WP_CLI::warning( "No site to import with the slug {$site_slug}." );
151151

152152
return;
153153
}
@@ -257,7 +257,7 @@ function ( &$item ) {
257257
*/
258258
private function import_xml_file( $path, $json, $editor ) {
259259
if ( ! file_exists( $path ) || ! is_readable( $path ) ) {
260-
\WP_CLI::warning( "Cannot import XML file. Either the file is not readable or it does not exist (${path})" );
260+
\WP_CLI::warning( "Cannot import XML file. Either the file is not readable or it does not exist ({$path})" );
261261
}
262262
$this->content_importer->import_file( $path, $json, $editor );
263263
$this->content_importer->maybe_bust_elementor_cache();

0 commit comments

Comments
 (0)