Skip to content

Commit cc93b6a

Browse files
author
Marius Burkard
committed
- Fixed strict php error in letsencrypt cron
1 parent 0526501 commit cc93b6a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/lib/classes/cron.d/900-letsencrypt.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ class cronjob_letsencrypt extends cronjob {
3636
public function onRunJob() {
3737
global $app, $conf;
3838

39-
$letsencrypt = array_shift( explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt')) );
39+
$letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt'));
40+
$letsencrypt = reset($letsencrypt);
4041
if(is_executable($letsencrypt)) {
4142
$version = trim(exec($letsencrypt . ' --version 2>/dev/null'));
4243
if(preg_match('/^(\S+)\s+(\d+(\.\d+)+)$/', $version, $matches)) {

0 commit comments

Comments
 (0)