From 3d690907678fa3b86aa6fc687049a604bbec09d0 Mon Sep 17 00:00:00 2001 From: steve-lad <72376554+steve-lad@users.noreply.github.com> Date: Sun, 18 Jul 2021 12:50:53 +0200 Subject: [PATCH] Fix finding master file --- sccpManTraits/helperFunctions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sccpManTraits/helperFunctions.php b/sccpManTraits/helperFunctions.php index 6432b23..08c7ca0 100644 --- a/sccpManTraits/helperFunctions.php +++ b/sccpManTraits/helperFunctions.php @@ -275,10 +275,11 @@ trait helperfunctions { dbug($request); $filesToGet = array(); $provisionerUrl = "https://github.com/dkgroot/provision_sccp/raw/master/"; - if (!$tftpBootXml = simplexml_load_file("{$this->sccppath['tftp_path']}/masterFilesStructure.xml")) { + if (!file_exists("{$this->sccppath['tftp_path']}/masterFilesStructure.xml")) { $this->getFileListFromProvisioner(); - $tftpBootXml = simplexml_load_file("{$this->sccppath['tftp_path']}/masterFilesStructure.xml"); } + $tftpBootXml = simplexml_load_file("{$this->sccppath['tftp_path']}/masterFilesStructure.xml"); + switch ($request['type']) { case 'firmware': $device = $request['device'];