Author: Mathias Reker ⚡️ (MathiasReker)
Committer: GitHub (web-flow)
Pusher: cmb69
Date: 2022-06-17T19:19:12+02:00

Commit: 
https://github.com/php/web-php/commit/546b144fe370c055deabdf20d3825f6c6b2baa0d
Raw diff: 
https://github.com/php/web-php/commit/546b144fe370c055deabdf20d3825f6c6b2baa0d.diff

Use elseif instead of else if

Closes GH-534.

Changed paths:
  M  mailing-lists.php
  M  manual/add-note.php


Diff:

diff --git a/mailing-lists.php b/mailing-lists.php
index e134096af..f0b69d603 100644
--- a/mailing-lists.php
+++ b/mailing-lists.php
@@ -55,7 +55,7 @@
     }
 
     // Check if any mailing list was selected
-    else if (empty($_POST['maillist'])) {
+    elseif (empty($_POST['maillist'])) {
         $error = "You need to select at least one mailing list to subscribe 
to." .
                  "<br>Please go back and try again.";
     }
diff --git a/manual/add-note.php b/manual/add-note.php
index 743c8f3fe..96e1d5789 100644
--- a/manual/add-note.php
+++ b/manual/add-note.php
@@ -107,13 +107,13 @@
         if ($result) {
             if (strpos($result, '[TOO MANY NOTES]') !== FALSE) {
                 print "<p class=\"formerror\">As a security precaution, we 
only allow a certain number of notes to be submitted per minute. At this time, 
this number has been exceeded. Please re-submit your note in about a 
minute.</p>";
-            } else if (($pos = strpos($result, '[SPAMMER]')) !== FALSE) {
+            } elseif (($pos = strpos($result, '[SPAMMER]')) !== FALSE) {
                 $ip       = trim(substr($result, $pos+9));
                 $spam_url = $ip_spam_lookup_url . $ip;
                 print '<p class="formerror">Your IP is listed in one of the 
spammers lists we use, which aren\'t controlled by us. More information is 
available at <a href="'.$spam_url.'">'.$spam_url.'</a>.</p>';
-            } else if (strpos($result, '[SPAM WORD]') !== FALSE) {
+            } elseif (strpos($result, '[SPAM WORD]') !== FALSE) {
                 echo '<p class="formerror">Your note contains a prohibited 
(usually SPAM) word. Please remove it and try again.</p>';
-            } else if (strpos($result, '[CLOSED]') !== FALSE) {
+            } elseif (strpos($result, '[CLOSED]') !== FALSE) {
                 echo '<p class="formerror">Due to some technical problems this 
service isn\'t currently working. Please try again later. Sorry for any 
inconvenience.</p>';
             } else {
                 echo "<!-- $result -->";

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

Reply via email to