Skip to content

Commit 9fd8da4

Browse files
committed
Limit addition of URL property when item is a class
See #94.
1 parent 486e129 commit 9fd8da4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/WP_CLI/CommandWithUpgrade.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,9 @@ protected function _search( $args, $assoc_args ) {
615615

616616
// Add `url` for plugin or theme on wordpress.org.
617617
foreach ( $items as $index => $item_object ) {
618-
$item_object->url = "https://wordpress.org/{$plural}/{$item_object->slug}/";
618+
if ( $item_object instanceof \stdClass ) {
619+
$item_object->url = "https://wordpress.org/{$plural}/{$item_object->slug}/";
620+
}
619621
}
620622

621623
if ( 'table' === $format ) {

0 commit comments

Comments
 (0)