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

-- 
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to