diff --git a/app/install/install_mysqlimport.php b/app/install/install_mysqlimport.php index e5c53329fb0d003f598f92f1aba62c36ae8d0734..dd6d94d854ca1bae955f2d2e319f92268d895619 100755 --- a/app/install/install_mysqlimport.php +++ b/app/install/install_mysqlimport.php @@ -52,7 +52,7 @@ exit</pre> <pre><?php $esc_user = escape_input($db['user']); $esc_pass = escape_input(_("<YOUR SECRET PASSWORD FROM config.php>")); - $esc_webhost = is_string($db['webhost']) && strlen($db['webhost']) ? escape_input($db['webhost']) : 'localhost'; + $esc_webhost = is_string(@$db['webhost']) && strlen(@$db['webhost']) ? escape_input($db['webhost']) : 'localhost'; $db_name = escape_input($db['name']); print "# Set permissions for phpipam user <br>"; diff --git a/app/install/select_install_type.php b/app/install/select_install_type.php index c36b83913597404fbd059c554eb9bee1e30c45b2..c817eb4d397e270568a097b98ec7efea6b8f9e7d 100755 --- a/app/install/select_install_type.php +++ b/app/install/select_install_type.php @@ -12,7 +12,7 @@ $text_prefix = @$_GET['subnetId']=="migrate" ? _("migrate") : _("install"); <div style="padding:10px;"> <div class="text-mute2d" style="margin:10px;"> - <?php print _("We are glad you decided phpipam to")." ".$text_prefix.". "._("Before you can start to process please:"); ?><br><br> + <?php print _("We are glad you decided to")." ".$text_prefix." phpipam. "._("Before you can start to process please:"); ?><br><br> <ul> <li><?php print _("Edit settings in config.php file"); ?></li> <li><?php print _("Create a MySQL/MariaDB database for phpipam, you can do this three ways (select below)"); ?></li> @@ -23,7 +23,7 @@ $text_prefix = @$_GET['subnetId']=="migrate" ? _("migrate") : _("install"); <?php // migrate - if($_GET['subnetId']=="migrate") { ?> + if(@$_GET['subnetId']=="migrate") { ?> <hr> <div class="alert alert-warning"> <?php print _("You selected option to migrate from old database.")."<br>"._("Please put SQL dump file from old phpipam installation to db/MIGRATE.sql file !"); ?> @@ -38,7 +38,7 @@ $text_prefix = @$_GET['subnetId']=="migrate" ? _("migrate") : _("install"); <ol style="margin-top:20px;"> <!-- automatic --> <li> - <a href="<?php print create_link("install","install_automatic", $_GET['subnetId']); ?>" class="btn btn-sm btn-default"><?php print _("Automatic database")." ".$title_prefix; ?></a> + <a href="<?php print create_link("install","install_automatic", @$_GET['subnetId']); ?>" class="btn btn-sm btn-default"><?php print _("Automatic database")." ".$title_prefix; ?></a> <br> <div class="text-muted"><?php print _("phpipam installer will create database for you automatically."); ?></div> <br> @@ -46,7 +46,7 @@ $text_prefix = @$_GET['subnetId']=="migrate" ? _("migrate") : _("install"); <!-- Mysql inport --> <li> - <a href="<?php print create_link("install","install_mysqlimport", $_GET['subnetId']); ?>" class="btn btn-sm btn-default"><?php print _("MySQL/MariaDB import instructions"); ?></a> + <a href="<?php print create_link("install","install_mysqlimport", @$_GET['subnetId']); ?>" class="btn btn-sm btn-default"><?php print _("MySQL/MariaDB import instructions"); ?></a> <br> <div class="text-muted"><?php print _("Install DB files with mysqlimport tool."); ?></div> <br> @@ -54,7 +54,7 @@ $text_prefix = @$_GET['subnetId']=="migrate" ? _("migrate") : _("install"); <!-- Manual install --> <li> - <a href="<?php print create_link("install","install_manual", $_GET['subnetId']); ?>" class="btn btn-sm btn-default"><?php print _("Manual database")." ".$title_prefix; ?></a> + <a href="<?php print create_link("install","install_manual", @$_GET['subnetId']); ?>" class="btn btn-sm btn-default"><?php print _("Manual database")." ".$title_prefix; ?></a> <br> <div class="text-muted"><?php print _("Install database manually with SQL queries."); ?></div> <br> diff --git a/functions/checks/check_php_build.php b/functions/checks/check_php_build.php index 612f0618e5be43a49656111265d79ac7e744eb95..9a0dcb931dfb801d05c35ea2365455d16432a90b 100755 --- a/functions/checks/check_php_build.php +++ b/functions/checks/check_php_build.php @@ -54,6 +54,8 @@ if (!@include_once 'PEAR.php') { $missingExt[] = "php PEAR support"; } +if(!isset($url)) { $url = ""; } + /* headers */ $error = []; $error[] = "<html>"; diff --git a/functions/classes/class.Install.php b/functions/classes/class.Install.php index f50466272631260e688b3d7473ab59ffc7973e00..5babec06f7277a73b77b7c917dccf809d63cbd2c 100644 --- a/functions/classes/class.Install.php +++ b/functions/classes/class.Install.php @@ -146,7 +146,7 @@ class Install extends Common_functions { $esc_user = addcslashes($this->db['user'],"'"); $esc_pass = addcslashes($this->db['pass'],"'"); $db_name = $this->db['name']; - $webhost = is_string($this->db['webhost']) && !is_blank($this->db['webhost']) ? addcslashes($this->db['webhost'],"'") : 'localhost'; + $webhost = is_string(@$this->db['webhost']) && !is_blank(@$this->db['webhost']) ? addcslashes($this->db['webhost'],"'") : 'localhost'; try { # Check if user exists; diff --git a/functions/classes/class.PDO.php b/functions/classes/class.PDO.php index ba2d379e939410998ad388837bfd6c86a0156d99..3fc9c89fba721cdeeb43119cc02d44648ec8b5e5 100644 --- a/functions/classes/class.PDO.php +++ b/functions/classes/class.PDO.php @@ -292,7 +292,7 @@ abstract class DB { * @return bool */ public function isConnected() { - return ($this->pdo !== null); + return (@$this->pdo !== null); } /**