Validate fixes (#13935)

* Fix version check abort when something goes wrong

* more generic message when failing to parse ajax
This commit is contained in:
Tony Murray
2022-04-20 23:10:36 -05:00
committed by GitHub
parent 8b82341cb7
commit 6ad5fdada5
3 changed files with 3 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ class Version
public function localCommit(): array
{
if ($this->is_git_install) {
[$local_sha, $local_date] = explode('|', rtrim(`git show --pretty='%H|%ct' -s HEAD`));
[$local_sha, $local_date] = array_pad(explode('|', rtrim(`git show --pretty='%H|%ct' -s HEAD`), 2), 2, '');
return [
'sha' => $local_sha,