From 9b14e10e353f5bd6c3ff1104b3eeb7aa219e939e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20Perr=C3=A9al?= <guillaume.perreal@irstea.fr> Date: Fri, 7 Dec 2018 11:53:18 +0100 Subject: [PATCH] PHP 5.6 compat. --- src/Config.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Config.php b/src/Config.php index f027e1a..8693814 100644 --- a/src/Config.php +++ b/src/Config.php @@ -150,7 +150,10 @@ final class Config extends PhpCsFixerConfig 'years', function () { $last = date('Y'); - $first = exec('git log --format=%cd --date=format:%Y --date-order | tail -n1') ?? $last; + $first = exec('git log --format=%cd --date=format:%Y --date-order | tail -n1'); + if (!$first) { + $first = '???'; + } return ($last !== null && $last !== $first) ? "$first-$last" : $first; } -- GitLab