瀏覽代碼

Change error to notice if not installed with git

1day2die 2 年之前
父節點
當前提交
bcd69b4582
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      app/Providers/AppServiceProvider.php
  2. 1 1
      themes/default/views/layouts/main.blade.php

+ 1 - 1
app/Providers/AppServiceProvider.php

@@ -135,7 +135,7 @@ class AppServiceProvider extends ServiceProvider
                 $branchname = $explodedstring[2]; //get the one that is always the branch name
             } catch (Exception $e) {
                 $branchname = 'unknown';
-                Log::error($e);
+                Log::notice($e);
             }
             config(['BRANCHNAME' => $branchname]);
 

+ 1 - 1
themes/default/views/layouts/main.blade.php

@@ -442,7 +442,7 @@
                     href="{{ url('/') }}">{{ env('APP_NAME', 'Laravel') }}</a>.</strong>
             All rights
             reserved. Powered by <a href="https://controlpanel.gg">ControlPanel</a>.
-            @if (!str_contains(config('BRANCHNAME'), 'main'))
+            @if (!str_contains(config('BRANCHNAME'), 'main') && !str_contains(config('BRANCHNAME'), 'unknown'))
                 Version <b>{{ config('app')['version'] }} - {{ config('BRANCHNAME') }}</b>
             @endif