Skip to content

Commit

Permalink
- php warnings
Browse files Browse the repository at this point in the history
- file extension invalid for forward email. Missing period
  • Loading branch information
sjpadgett committed May 20, 2024
1 parent b9a3059 commit 60d8454
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ function getLayoutRes()
$form_city = '';
$form_postcode = '';
$form_countrycode = '';
$form_regdate = DateToYYYYMMDD(trim($_POST['regdate']));
$form_regdate = DateToYYYYMMDD(trim($_POST['regdate'] ?? ''));
newPatientData(
$_POST["db_id"],
$_POST["db_id"] ?? '',
$_POST["title"] ?? '',
$form_fname,
$form_lname,
Expand Down Expand Up @@ -160,16 +160,16 @@ function getLayoutUOR($form_id, $field_id)
$_POST = $data;
unset($data);
}
$form_pubpid = $_POST['pubpid'] ? trim($_POST['pubpid']) : '';
$form_title = $_POST['title'] ? trim($_POST['title']) : '';
$form_fname = $_POST['fname'] ? trim($_POST['fname']) : '';
$form_mname = $_POST['mname'] ? trim($_POST['mname']) : '';
$form_lname = $_POST['lname'] ? trim($_POST['lname']) : '';
$form_refsource = $_POST['refsource'] ? trim($_POST['refsource']) : '';
$form_sex = $_POST['sex'] ? trim($_POST['sex']) : '';
$form_refsource = $_POST['refsource'] ? trim($_POST['refsource']) : '';
$form_dob = $_POST['DOB'] ? trim($_POST['DOB']) : '';
$form_regdate = $_POST['regdate'] ? trim($_POST['regdate']) : date('Y-m-d');
$form_pubpid = $_POST['pubpid'] ?? '' ? trim($_POST['pubpid']) : '';
$form_title = $_POST['title'] ?? '' ? trim($_POST['title']) : '';
$form_fname = $_POST['fname'] ?? '' ? trim($_POST['fname']) : '';
$form_mname = $_POST['mname'] ?? '' ? trim($_POST['mname']) : '';
$form_lname = $_POST['lname'] ?? '' ? trim($_POST['lname']) : '';
$form_refsource = $_POST['refsource'] ?? '' ? trim($_POST['refsource']) : '';
$form_sex = $_POST['sex'] ?? '' ? trim($_POST['sex']) : '';
$form_refsource = $_POST['refsource'] ?? '' ? trim($_POST['refsource']) : '';
$form_dob = $_POST['DOB'] ?? '' ? trim($_POST['DOB']) : '';
$form_regdate = $_POST['regdate'] ?? '' ? trim($_POST['regdate']) : date('Y-m-d');

?>
<!DOCTYPE html>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public function forwardFax(): string

$content = $fax->FaxImage;
$c_header = $fax->DocumentParams->Type;
$ext = $c_header == 'application/pdf' ? 'pdf' : ($c_header == 'image/tiff' || $c_header == 'image/tif' ? 'tiff' : 'txt');
$ext = $c_header == 'application/pdf' ? '.pdf' : ($c_header == 'image/tiff' || $c_header == 'image/tif' ? '.tiff' : '.txt');
$filepath = $this->baseDir . "/send/" . ($jobId . $ext);

if (!file_exists($this->baseDir . '/send')) {
Expand Down Expand Up @@ -430,7 +430,7 @@ public function viewFax(): string
throw new Exception(sprintf('Directory "%s" was not created', $faxStoreDir));
}

$file_name = "{$faxStoreDir}/Fax_{$docId}." . ($c_header == 'application/pdf' ? 'pdf' : ($c_header == 'image/tiff' ? 'tiff' : 'txt'));
$file_name = "{$faxStoreDir}/Fax_{$docId}" . ($c_header == 'application/pdf' ? '.pdf' : ($c_header == 'image/tiff' ? '.tiff' : '.txt'));
file_put_contents($file_name, base64_decode($faxImage));
$this->setSession('where', $file_name);
$this->setFaxDeleted($apiResponse->JobId);
Expand Down

0 comments on commit 60d8454

Please sign in to comment.