From 0af38c471a32ede3d267742d7652bcd8b9acbe9d Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 26 May 2016 12:27:39 -0400
Subject: [PATCH] Fixed #3930 usage of split in letsencrypt cron module.

---
 server/plugins-available/apache2_plugin.inc.php |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 8c1da78..8ff39ca 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -882,9 +882,9 @@
 			}
             
           // get the primitive folder for document_root and the filesystem, will need it later.
-          $df_output=exec("df -T $document_root|awk 'END{print \$2,\$NF}'");
-          $file_system = explode(" ", $df_output)[0];
-          $primitive_root = explode(" ", $df_output)[1];
+          $df_output=explode(" ", exec("df -T $document_root|awk 'END{print \$2,\$NF}'"));
+          $file_system = $df_output[0];
+          $primitive_root = $df_output[1];
 
 		  if ( in_array($file_system , array('ext2','ext3','ext4'), true) ) {
             exec('setquota -u '. $username . ' ' . $blocks_soft . ' ' . $blocks_hard . ' 0 0 -a &> /dev/null');
@@ -1234,7 +1234,7 @@
 				$app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG);
 				
 				$success = false;
-				$letsencrypt = array_shift( split("\n", `which letsencrypt /root/.local/share/letsencrypt/bin/letsencrypt`) );
+				$letsencrypt = array_shift( explode("\n", `which letsencrypt /root/.local/share/letsencrypt/bin/letsencrypt`) );
 				if(is_executable($letsencrypt)) {
 					$success = $this->_exec($letsencrypt . " auth --text --agree-tos --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain --domains $lddomain --webroot-path /usr/local/ispconfig/interface/acme");
 				}

--
Gitblit v1.9.1