| 1 | Index: wp-admin/includes/class-wp-upgrader.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-admin/includes/class-wp-upgrader.php (revision 27527) |
|---|
| 4 | +++ wp-admin/includes/class-wp-upgrader.php (working copy) |
|---|
| 5 | @@ -628,7 +628,7 @@ |
|---|
| 6 | ) |
|---|
| 7 | ) ); |
|---|
| 8 | |
|---|
| 9 | - $results[$plugin] = $this->result; |
|---|
| 10 | + $results[$plugin] = $result; |
|---|
| 11 | |
|---|
| 12 | // Prevent credentials auth screen from displaying multiple times |
|---|
| 13 | if ( false === $result ) |
|---|
| 14 | @@ -1027,7 +1027,7 @@ |
|---|
| 15 | ), |
|---|
| 16 | ) ); |
|---|
| 17 | |
|---|
| 18 | - $results[$theme] = $this->result; |
|---|
| 19 | + $results[$theme] = $result; |
|---|
| 20 | |
|---|
| 21 | // Prevent credentials auth screen from displaying multiple times |
|---|
| 22 | if ( false === $result ) |
|---|
| 23 | @@ -1202,7 +1202,12 @@ |
|---|
| 24 | if ( $update ) |
|---|
| 25 | $update = array( $update ); |
|---|
| 26 | $results = $this->bulk_upgrade( $update, $args ); |
|---|
| 27 | - return $results[0]; |
|---|
| 28 | + |
|---|
| 29 | + if ( is_array( $results ) ) { |
|---|
| 30 | + return $results[0]; |
|---|
| 31 | + } else { |
|---|
| 32 | + return $results; |
|---|
| 33 | + } |
|---|
| 34 | } |
|---|
| 35 | |
|---|
| 36 | function bulk_upgrade( $language_updates = array(), $args = array() ) { |
|---|
| 37 | @@ -1283,7 +1288,7 @@ |
|---|
| 38 | |
|---|
| 39 | $result = $this->run( $options ); |
|---|
| 40 | |
|---|
| 41 | - $results[] = $this->result; |
|---|
| 42 | + $results[] = $result; |
|---|
| 43 | |
|---|
| 44 | // Prevent credentials auth screen from displaying multiple times. |
|---|
| 45 | if ( false === $result ) |
|---|