summaryrefslogtreecommitdiff
path: root/app/Controllers/updateController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-05-30 12:05:50 +0200
committerGravatar GitHub <noreply@github.com> 2021-05-30 12:05:50 +0200
commit54e0a6e5535863dc6fc4b1f6f3543bbf905974b1 (patch)
tree66932fa39d7a5901d09a9144e57071f0c5b6514b /app/Controllers/updateController.php
parent319d7dc1856a7a724291107a6df7f85ee3e31809 (diff)
Fix git update error message (#3645)
#fix https://github.com/FreshRSS/FreshRSS/issues/3644
Diffstat (limited to 'app/Controllers/updateController.php')
-rw-r--r--app/Controllers/updateController.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php
index 8ed2380c5..6f947d0c6 100644
--- a/app/Controllers/updateController.php
+++ b/app/Controllers/updateController.php
@@ -48,7 +48,7 @@ class FreshRSS_update_Controller extends Minz_ActionController {
try {
exec('git fetch --prune', $output, $return);
if ($return == 0) {
- unset($output);
+ $output = [];
exec('git status -sb --porcelain remote', $output, $return);
} else {
$line = is_array($output) ? implode('; ', $output) : $output;
@@ -71,14 +71,15 @@ class FreshRSS_update_Controller extends Minz_ActionController {
try {
exec('git fetch --prune', $output, $return);
if ($return == 0) {
- unset($output);
+ $output = [];
exec('git reset --hard FETCH_HEAD', $output, $return);
}
+ $output = [];
self::migrateToGitEdge();
} catch (Exception $e) {
Minz_Log::warning('Git error: ' . $e->getMessage());
- if ($output == '') {
+ if (empty($output)) {
$output = $e->getMessage();
}
$return = 1;