Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
afragen committed Feb 8, 2023
2 parents 8d32c86 + 0405873 commit 6ec391e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#### [unreleased]

#### 12.1.2 / 2023-02-08
* fix for webhook updating issue if `$branches` not defined, thanks @awunsch

#### 12.1.1 / 2023-02-07
* remove force of Network activation, messes up Freemius license activation on multisite
* composer update
Expand Down
2 changes: 1 addition & 1 deletion git-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Plugin Name: Git Updater
* Plugin URI: https://git-updater.com
* Description: A plugin to automatically update GitHub hosted plugins, themes, and language packs. Additional API plugins available for Bitbucket, GitLab, Gitea, and Gist.
* Version: 12.1.1
* Version: 12.1.2
* Author: Andy Fragen
* License: MIT
* Domain Path: /languages
Expand Down
6 changes: 3 additions & 3 deletions src/Git_Updater/Traits/API_Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,14 @@ public function get_remote_api_branches( $git, $request ) {

if ( $response ) {
$branches = $this->parse_branch_response( $response );
$this->type->branches = $branches;
$this->set_repo_cache( 'branches', $branches );
$this->type->branches = (array) $branches;
$this->set_repo_cache( 'branches', (array) $branches );

return true;
}
}

$this->type->branches = $response;
$this->type->branches = (array) $response;

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Git_Updater/Traits/GU_Trait.php
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ public static function get_plugin_version() {
* @return bool
*/
public function use_release_asset( $branch_switch = false ) {
$is_tag = $branch_switch && ! array_key_exists( $branch_switch, $this->type->branches );
$is_tag = property_exists( $this->type, 'branches' ) ? $branch_switch && ! array_key_exists( $branch_switch, (array) $this->type->branches ) : false;
$switch_master_tag = $this->type->primary_branch === $branch_switch || $is_tag;
$current_master_noswitch = $this->type->primary_branch === $this->type->branch && false === $branch_switch;

Expand Down

0 comments on commit 6ec391e

Please sign in to comment.