OSDN Git Service

Force the version field if not exist so it shows up in the table
authortolgap <tolga@hoppinger.com>
Fri, 10 May 2013 13:16:31 +0000 (15:16 +0200)
committertolgap <tolga@hoppinger.com>
Fri, 10 May 2013 13:16:31 +0000 (15:16 +0200)
php/WP_CLI/CommandWithUpgrade.php

index f8b349a..4ffe023 100644 (file)
@@ -226,6 +226,9 @@ abstract class CommandWithUpgrade extends \WP_CLI_Command {
                foreach ( $items as $item ) {
                        $object = new \stdClass;
 
+                       if ( empty( $item['version'] ) )
+                               $item['version'] = "";
+
                        foreach ( $item as $field => $value ) {
                                if ( $value === true ) {
                                        $value = "available";