Skip to content

Commit 5ce0155

Browse files
swissspidyCopilot
andauthored
Update src/Media_Command.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 10f2d15 commit 5ce0155

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Media_Command.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,11 @@ public function import( $args, $assoc_args = array() ) {
491491
if ( $porcelain ) {
492492
if ( 'url' === strtolower( $porcelain ) ) {
493493
$file_location = $this->get_real_attachment_url( $success );
494-
WP_CLI::line( $file_location ?: 'Attachment URL not found' );
494+
if ( $file_location ) {
495+
WP_CLI::line( $file_location );
496+
} else {
497+
WP_CLI::error( 'Attachment URL not found' );
498+
}
495499
} else {
496500
WP_CLI::line( (string) $success );
497501
}

0 commit comments

Comments
 (0)