From c969847ee994f652307dd017caa9baffa3aaa23d Mon Sep 17 00:00:00 2001 From: bradymiller Date: Wed, 27 Apr 2016 00:42:13 -0700 Subject: [PATCH] PHP7 bug fix --- controllers/C_Prescription.class.php | 4 ---- library/classes/Controller.class.php | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/controllers/C_Prescription.class.php b/controllers/C_Prescription.class.php index a710b03fd..06b414f14 100644 --- a/controllers/C_Prescription.class.php +++ b/controllers/C_Prescription.class.php @@ -864,7 +864,6 @@ class C_Prescription extends Controller { if(empty($cmd)) { $err .= " Send fax not set in includes/config.php"; - break; } else { @@ -874,7 +873,6 @@ class C_Prescription extends Controller { if(empty($faxFile)) { $err .= " _print_prescription returned empty file"; - break; } $fileName = $GLOBALS['OE_SITE_DIR'] . "/documents/" . $p->get_id() . $p->get_patient_id() . "_fax_.pdf"; @@ -884,12 +882,10 @@ class C_Prescription extends Controller { if(!$handle) { $err .= " Failed to open file $fileName to write fax to"; - break; } if(fwrite($handle, $faxFile) === false) { $err .= " Failed to write data to $fileName"; - break; } fclose($handle); $args = " -n -d $faxNum $fileName"; diff --git a/library/classes/Controller.class.php b/library/classes/Controller.class.php index dcc5fe827..0a893e10c 100644 --- a/library/classes/Controller.class.php +++ b/library/classes/Controller.class.php @@ -97,7 +97,7 @@ class Controller extends Smarty { $c_action = preg_replace("/[^A-Za-z0-9_]/","",array_pop($args)); $args = array_reverse($args); - if(!@call_user_func(array(Controller,"i_once"),$GLOBALS['fileroot'] ."/controllers/C_" . $c_name . ".class.php")) { + if(!call_user_func(array(Controller,"i_once"),$GLOBALS['fileroot'] ."/controllers/C_" . $c_name . ".class.php")) { echo "Unable to load controller $name\n, please check the first argument supplied in the URL and try again"; exit; } -- 2.11.4.GIT