Skip to content

Commit 6ec391e

Browse files
committed
Merge branch 'develop'
2 parents 8d32c86 + 0405873 commit 6ec391e

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#### [unreleased]
22

3+
#### 12.1.2 / 2023-02-08
4+
* fix for webhook updating issue if `$branches` not defined, thanks @awunsch
5+
36
#### 12.1.1 / 2023-02-07
47
* remove force of Network activation, messes up Freemius license activation on multisite
58
* composer update

git-updater.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Plugin Name: Git Updater
1313
* Plugin URI: https://git-updater.com
1414
* Description: A plugin to automatically update GitHub hosted plugins, themes, and language packs. Additional API plugins available for Bitbucket, GitLab, Gitea, and Gist.
15-
* Version: 12.1.1
15+
* Version: 12.1.2
1616
* Author: Andy Fragen
1717
* License: MIT
1818
* Domain Path: /languages

src/Git_Updater/Traits/API_Common.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,14 @@ public function get_remote_api_branches( $git, $request ) {
306306

307307
if ( $response ) {
308308
$branches = $this->parse_branch_response( $response );
309-
$this->type->branches = $branches;
310-
$this->set_repo_cache( 'branches', $branches );
309+
$this->type->branches = (array) $branches;
310+
$this->set_repo_cache( 'branches', (array) $branches );
311311

312312
return true;
313313
}
314314
}
315315

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

318318
return true;
319319
}

src/Git_Updater/Traits/GU_Trait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ public static function get_plugin_version() {
692692
* @return bool
693693
*/
694694
public function use_release_asset( $branch_switch = false ) {
695-
$is_tag = $branch_switch && ! array_key_exists( $branch_switch, $this->type->branches );
695+
$is_tag = property_exists( $this->type, 'branches' ) ? $branch_switch && ! array_key_exists( $branch_switch, (array) $this->type->branches ) : false;
696696
$switch_master_tag = $this->type->primary_branch === $branch_switch || $is_tag;
697697
$current_master_noswitch = $this->type->primary_branch === $this->type->branch && false === $branch_switch;
698698

0 commit comments

Comments
 (0)