Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
miya0001 committed Feb 6, 2017
2 parents 095dab0 + 0d8d970 commit 8cad05a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ public static function get_latest_vccw_url()
$api = "https://api.github.com/repos/vccw-team/vccw/releases/latest";
$body = json_decode( self::download( $api ) );

if ( $body ) {
if ( ! empty( $body->assets[0] ) && ! empty( $body->assets[0]->browser_download_url ) ) {
return $body->assets[0]->browser_download_url;
} elseif ( $body ) {
return $body->zipball_url;
}
}
Expand Down

0 comments on commit 8cad05a

Please sign in to comment.