← All changes
|
backend/src/Data/Transformers/PluginUpdatesTransformer.php
+3
-3
0.3.1
→
1.5.5.1
View file →
| @@ -20,9 +20,9 @@ | ||
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | if ( isset( $update->banners ) ) { |
| 23 | 23 | $update->banners = (array) $update->banners; |
| 24 | - | |
| 24 | + | |
| 25 | 25 | if ( isset( $update->banners['2x'] ) ) { |
| 26 | 26 | $banner = $update->banners['2x']; |
| 27 | 27 | } elseif ( isset( $update->banners['1x'] ) ) { |
| 28 | 28 | $banner = $update->banners['1x']; |
| @@ -32,9 +32,9 @@ | ||
| 32 | 32 | return [ |
| 33 | 33 | 'author' => $plugin->AuthorName, |
| 34 | 34 | 'authorURI' => $plugin->AuthorURI, |
| 35 | 35 | 'banner' => $banner, |
| 36 | - 'bannerSizes' => $update->banners, | |
| 36 | + 'bannerSizes' => isset( $update->banners ) ? $update->banners : null, | |
| 37 | 37 | 'content' => $plugin->Description, |
| 38 | 38 | 'id' => $update->plugin, |
| 39 | 39 | 'meta' => $plugin->Version . ' by ' . $plugin->AuthorName, |
| 40 | 40 | 'metaUpdated' => $update->new_version . ' by ' . $plugin->AuthorName, |
| @@ -45,9 +45,9 @@ | ||
| 45 | 45 | 'type' => 'plugin', |
| 46 | 46 | 'version' => $plugin->Version, |
| 47 | 47 | 'updatedVersion' => $update->new_version, |
| 48 | 48 | 'tested' => $update->tested, |
| 49 | - 'requiresPHP' => $update->requires_php, | |
| 49 | + 'requiresPHP' => isset( $update->requires_php ) ? $update->requires_php : null, | |
| 50 | 50 | 'pluginURI' => $plugin->PluginURI, |
| 51 | 51 | ]; |
| 52 | 52 | } |
| 53 | 53 | } |