Skip to content

Commit

Permalink
fix: restore php 7.4 support
Browse files Browse the repository at this point in the history
Replacing str_contains() with strpos()
  • Loading branch information
thathoff committed Aug 10, 2022
1 parent 126e232 commit 3711b7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/KirbyGitHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function status() {
$hasRemote = false;
$diff = null;
foreach ($upstreamResponse as $key => $line) {
if (str_contains($line, 'branch.ab')) {
if (!empty($line) && strpos($line, 'branch.ab') !== false) {
$hasRemote = true;

preg_match('/\+\d+/', $line, $ahead);
Expand Down

0 comments on commit 3711b7a

Please sign in to comment.