mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
Remove duplicated !isset($var) (#570)
This commit is contained in:
4
cal.php
4
cal.php
@@ -86,8 +86,8 @@ if ($cm && $cy && !checkdate($cm,1,$cy)) {
|
||||
}
|
||||
|
||||
// Give defaults for the month and day values if they were invalid
|
||||
if (!isset($cm) || $cm == 0) { $cm = date("m"); }
|
||||
if (!isset($cy) || $cy == 0) { $cy = date("Y"); }
|
||||
if (empty($cm)) { $cm = date("m"); }
|
||||
if (empty($cy)) { $cy = date("Y"); }
|
||||
|
||||
// Start of the month date
|
||||
$date = mktime(0, 0, 1, $cm, 1, $cy);
|
||||
|
||||
@@ -80,7 +80,7 @@ if (count($_POST) && (!isset($_POST['purpose']) || !is_array($_POST['purpose'])
|
||||
if (empty($_POST['group']) || $_POST['group'] === 'none' || !isset($groups[$_POST['group']])) {
|
||||
$error .= "You did not fill out where to send the request. <br>";
|
||||
}
|
||||
if (!isset($_POST['guidelines']) || !$_POST['guidelines']) {
|
||||
if (empty($_POST['guidelines'])) {
|
||||
$error .= "You did not agree to follow the contribution guidelines. <br>";
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ $vars = array(
|
||||
'emonth', 'eyear', 'recur', 'recur_day'
|
||||
);
|
||||
foreach ($vars as $varname) {
|
||||
if (!isset($_POST[$varname]) || empty($_POST[$varname])) {
|
||||
if (empty($_POST[$varname])) {
|
||||
$_POST[$varname] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user