Skip to content

Commit e7c1c28

Browse files
committed
response array workaround
next release
1 parent 7176b97 commit e7c1c28

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

CHANGES.md

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

3+
#### 9.9.24 / 2025-01-06
4+
5+
* Response array workaround.
6+
37
#### 9.9.23 / 2024-06-04
48

59
* Fixed GHU_Trait.

github-updater.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Plugin Name: GitHub Updater
1313
* Plugin URI: https://github.com/cbratschi/github-updater
1414
* Description: A plugin to automatically update GitHub, Bitbucket, GitLab, or Gitea hosted plugins, themes, and language packs. It also allows for remote installation of plugins or themes into WordPress.
15-
* Version: 9.9.23
15+
* Version: 9.9.24
1616
* Author: Andy Fragen, Christoph Bratschi
1717
* License: GNU General Public License v2
1818
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -22,7 +22,7 @@
2222
* GitHub Plugin URI: https://github.com/cbratschi/github-updater
2323
* GitHub Languages: https://github.com/afragen/github-updater-translations
2424
* Requires at least: 6.0
25-
* Tested up to: 6.5
25+
* Tested up to: 6.7.1
2626
* Requires PHP: 7.4
2727
*/
2828

languages/github-updater.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is distributed under the GNU General Public License v2.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: GitHub Updater 9.9.23\n"
5+
"Project-Id-Version: GitHub Updater 9.9.24\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/github-updater\n"
77
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
88
"Language-Team: LANGUAGE <[email protected]>\n"

src/GitHub_Updater/API/GitHub_API.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,17 @@ class GitHub_API extends API implements API_Interface {
3636
*/
3737
public function __construct( $type ) {
3838
parent::__construct();
39+
3940
$this->type = $type;
4041
$this->response = $this->get_repo_cache();
4142
$branch = new Branch( $this->response );
43+
4244
if ( ! empty( $type->branch ) ) {
4345
$this->type->branch = ! empty( $branch->cache['current_branch'] )
4446
? $branch->cache['current_branch']
4547
: $type->branch;
4648
}
49+
4750
$this->settings_hook( $this );
4851
$this->add_settings_subtab();
4952
$this->add_install_fields( $this );

src/GitHub_Updater/Traits/GHU_Trait.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ public function set_repo_cache( $id, $response, $repo = false, $timeout = false
135135
*/
136136
$timeout = apply_filters( 'github_updater_repo_cache_timeout', $timeout, $id, $response, $repo );
137137

138+
//PHP Deprecated: Automatic conversion of false to array is deprecated
139+
if (!is_array($this->response)) {
140+
$this->response = [];
141+
}
142+
138143
$this->response['timeout'] = strtotime( $timeout );
139144
$this->response[ $id ] = $response;
140145

0 commit comments

Comments
 (0)