Heredoc/nowdoc with an indented closing marker is not supported in PHP 7.2 or earlier.
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -505,15 +505,15 @@ class AcmeSh extends \Froxlor\Cron\FroxlorCron
|
|||||||
|
|
||||||
public static function getWorkingDirFromEnv($domain = "", $forced_noecc = false)
|
public static function getWorkingDirFromEnv($domain = "", $forced_noecc = false)
|
||||||
{
|
{
|
||||||
if (Settings::Get('system.leecc') > 0 && !$forced_noecc) {
|
if (Settings::Get('system.leecc') > 0 && ! $forced_noecc) {
|
||||||
$domain .= "_ecc";
|
$domain .= "_ecc";
|
||||||
}
|
}
|
||||||
$env_file = FileDir::makeCorrectFile(dirname(self::$acmesh) . '/acme.sh.env');
|
$env_file = FileDir::makeCorrectFile(dirname(self::$acmesh) . '/acme.sh.env');
|
||||||
if (file_exists($env_file)) {
|
if (file_exists($env_file)) {
|
||||||
$output = [];
|
$output = [];
|
||||||
$cut = <<<EOC
|
$cut = <<<EOC
|
||||||
cut -d'"' -f2
|
cut -d'"' -f2
|
||||||
EOC;
|
EOC;
|
||||||
exec('grep "LE_WORKING_DIR" ' . escapeshellarg($env_file) . ' | ' . $cut, $output);
|
exec('grep "LE_WORKING_DIR" ' . escapeshellarg($env_file) . ' | ' . $cut, $output);
|
||||||
if (is_array($output) && ! empty($output) && isset($output[0]) && ! empty($output[0])) {
|
if (is_array($output) && ! empty($output) && isset($output[0]) && ! empty($output[0])) {
|
||||||
return FileDir::makeCorrectDir($output[0] . "/" . $domain);
|
return FileDir::makeCorrectDir($output[0] . "/" . $domain);
|
||||||
|
|||||||
Reference in New Issue
Block a user