Permalink
Browse files

fix undefined index and variables in installer script.

rebased 3 commits into 1
  • Loading branch information...
1 parent 777de3a commit 7e5615c2f67623b3e1abb60b3d7148eec4ce2cd7 @Wakie87 Wakie87 committed with bradymiller Aug 9, 2016
Showing with 24 additions and 23 deletions.
  1. +1 −1 gacl/gacl_api.class.php
  2. +19 −20 library/classes/Installer.class.php
  3. +4 −2 setup.php
@@ -1074,7 +1074,7 @@ function add_acl($aco_array, $aro_array, $aro_group_ids=NULL, $axo_array=NULL, $
}
foreach ($map_array as $section_value => $value_array) {
- $this->debug_text ('Insert: '. strtoupper($map) .' Section Value: '. $section_value .' '. strtoupper($map) .' VALUE: '. $value_array);
+ $this->debug_text ('Insert: '. strtoupper($map) . ' Section Value: $section_value' . strtoupper($map) . ' VALUE: $value_array');
// $this->showarray ($aco_value_array);
if (!is_array($value_array)) {
@@ -10,26 +10,25 @@ public function __construct( $cgi_variables )
// Installation variables
// For a good explanation of these variables, see documentation in
// the contrib/util/installScripts/InstallerAuto.php file.
- $this->iuser = $cgi_variables['iuser'];
- $this->iuserpass = $cgi_variables['iuserpass'];
- $this->iuname = $cgi_variables['iuname'];
- $this->iufname = $cgi_variables['iufname'];
- $this->igroup = $cgi_variables['igroup'];
- $this->server = $cgi_variables['server']; // mysql server (usually localhost)
- $this->loginhost = $cgi_variables['loginhost']; // php/apache server (usually localhost)
- $this->port = $cgi_variables['port'];
- $this->root = $cgi_variables['root'];
- $this->rootpass = $cgi_variables['rootpass'];
- $this->login = $cgi_variables['login'];
- $this->pass = $cgi_variables['pass'];
- $this->dbname = $cgi_variables['dbname'];
- $this->collate = $cgi_variables['collate'];
- $this->site = $cgi_variables['site'];
- $this->source_site_id = $cgi_variables['source_site_id'];
- $this->clone_database = $cgi_variables['clone_database'];
- $this->no_root_db_access = $cgi_variables['no_root_db_access']; // no root access to database. user/privileges pre-configured
- $this->development_translations = $cgi_variables['development_translations'];
-
+ $this->iuser = isset($cgi_variables['iuser']) ? ($cgi_variables['iuser']) : '';
+ $this->iuserpass = isset($cgi_variables['iuserpass']) ? ($cgi_variables['iuserpass']) : '';
+ $this->iuname = isset($cgi_variables['iuname']) ? ($cgi_variables['iuname']) : '';
+ $this->iufname = isset($cgi_variables['iufname']) ? ($cgi_variables['iufname']) : '';
+ $this->igroup = isset($cgi_variables['igroup']) ? ($cgi_variables['igroup']) : '';
+ $this->server = isset($cgi_variables['server']) ? ($cgi_variables['server']) : ''; // mysql server (usually localhost)
+ $this->loginhost = isset($cgi_variables['loginhost']) ? ($cgi_variables['loginhost']) : ''; // php/apache server (usually localhost)
+ $this->port = isset($cgi_variables['port']) ? ($cgi_variables['port']): '';
+ $this->root = isset($cgi_variables['root']) ? ($cgi_variables['root']) : '';
+ $this->rootpass = isset($cgi_variables['rootpass']) ? ($cgi_variables['rootpass']) : '';
+ $this->login = isset($cgi_variables['login']) ? ($cgi_variables['login']) : '';
+ $this->pass = isset($cgi_variables['pass']) ? ($cgi_variables['pass']) : '';
+ $this->dbname = isset($cgi_variables['dbname']) ? ($cgi_variables['dbname']) : '';
+ $this->collate = isset($cgi_variables['collate']) ? ($cgi_variables['collate']) : '';
+ $this->site = isset($cgi_variables['site']) ? ($cgi_variables['site']) : '';
+ $this->source_site_id = isset($cgi_variables['source_site_id']) ? ($cgi_variables['source_site_id']) : '';
+ $this->clone_database = isset($cgi_variables['clone_database']) ? ($cgi_variables['clone_database']) : '';
+ $this->no_root_db_access = isset($cgi_variables['no_root_db_access']) ? ($cgi_variables['no_root_db_access']) : ''; // no root access to database. user/privileges pre-configured
+ $this->development_translations = isset($cgi_variables['development_translations']) ? ($cgi_variables['development_translations']) : '';
// Make this true for IPPF.
$this->ippf_specific = false;
View
@@ -17,6 +17,7 @@
*
* @package OpenEMR
* @author Roberto Vasquez <robertogagliotta@gmail.com>
+ * @author Scott Wakefield <scott@npclinics.com.au>
* @link http://www.open-emr.org
*
**/
@@ -28,7 +29,7 @@
//turn off PHP compatibility warnings
ini_set("session.bug_compat_warn","off");
-$state = $_POST["state"];
+$state = isset($_POST["state"]) ? ($_POST["state"]) : '';
// Make this true for IPPF.
$ippf_specific = false;
@@ -200,7 +201,8 @@ function cloneClicked() {
<?php
-$inst = $_POST["inst"];
+$inst = isset($_POST["inst"]) ? ($_POST["inst"]) : '';
+
if (($config == 1) && ($state < 4)) {
echo "OpenEMR has already been installed. If you wish to force re-installation, then edit $installer->conffile (change the 'config' variable to 0), and re-run this script.<br>\n";

0 comments on commit 7e5615c

Please sign in to comment.