[web-php] master: Combine consecutive unsets (#543)
| From: | Mathias Reker ⚡️ via GitHub | Date: | Tue, 05 Jul 2022 14:07:53 +0000 |
| Subject: | [web-php] master: Combine consecutive unsets (#543) | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-30270@lists.php.net to get a copy of this message | ||
Author: Mathias Reker ⚡️ (MathiasReker)
Committer: GitHub (web-flow)
Pusher: kamil-tekiela
Date: 2022-07-05T15:01:39+01:00
Commit: https://github.com/php/web-php/commit/73f3c628fdb51b5a5466f786c4b55601b09a6b45
Raw diff: https://github.com/php/web-php/commit/73f3c628fdb51b5a5466f786c4b55601b09a6b45.diff
Combine consecutive unsets (#543)
Changed paths:
M cal.php
Diff:
diff --git a/cal.php b/cal.php
index b8f71fd84..24794d70e 100644
--- a/cal.php
+++ b/cal.php
@@ -75,14 +75,14 @@
// Wrong date specified
else {
$errors[] = "The specified date (".htmlentities("$cy/$cm/$cd",
ENT_QUOTES | ENT_IGNORE, 'UTF-8').") was not valid.";
- unset($cm); unset($cd); unset($cy);
+ unset($cm, $cd, $cy);
}
}
// Check if month and year is valid
if ($cm && $cy && !checkdate($cm,1,$cy)) {
$errors[] = "The specified year and month (".htmlentities("$cy, $cm",
ENT_QUOTES | ENT_IGNORE, 'UTF-8').") are not valid.";
- unset($cm); unset($cy);
+ unset($cm, $cy);
}
// Give defaults for the month and day values if they were invalid