less PHP notices

This commit is contained in:
Roland Gruber 2010-05-07 19:12:06 +00:00
parent 353cfb5e35
commit f1acd71efd
2 changed files with 7 additions and 4 deletions

View File

@ -47,8 +47,8 @@ if (!checkIfWriteAccessIsAllowed()) {
setlanguage();
// check if user already pressed button
if ($_POST['add_suff'] || $_POST['cancel']) {
if ($_POST['add_suff']) {
if (isset($_POST['add_suff']) || isset($_POST['cancel'])) {
if (isset($_POST['add_suff'])) {
$fail = array();
$errors = array();
$new_suff = $_POST['new_suff'];
@ -144,7 +144,7 @@ if ($_POST['add_suff'] || $_POST['cancel']) {
}
include 'main_header.php';
// print error/success messages
if ($_POST['add_suff']) {
if (isset($_POST['add_suff'])) {
if (sizeof($fail) > 0) {
// print error messages
for ($i = 0; $i < sizeof($fail); $i++) {

View File

@ -382,7 +382,10 @@ if(!empty($_POST['checklogin'])) {
exit();
}
else {
$clientSource = $_SERVER['REMOTE_ADDR'] . '/' . $_SERVER['REMOTE_HOST'];
$clientSource = $_SERVER['REMOTE_ADDR'];
if (isset($_SERVER['REMOTE_HOST'])) {
$clientSource .= '/' . $_SERVER['REMOTE_HOST'];
}
if (get_magic_quotes_gpc() == 1) {
$_POST['passwd'] = stripslashes($_POST['passwd']);
}