aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/updateController.php
diff options
context:
space:
mode:
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;