Skip to content

Commit c9c7470

Browse files
fix bug related to isset($_POST['submit'])
1 parent 097ca21 commit c9c7470

98 files changed

Lines changed: 185 additions & 185 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/customform.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
$dispError = "";
6262
$countErrors = 0;
6363

64-
if(isset($_POST['submit'])) {
64+
if(($_POST['submit'] ?? '')) {
6565

6666
// Check for multi submissions
6767

@@ -268,7 +268,7 @@
268268

269269
}
270270

271-
if(!isset($_POST['submit'])) {
271+
if(!($_POST['submit'] ?? '')) {
272272
echo "<div class='formDiv'>";
273273

274274
if($dispError != "") {

src/diplomacy/request.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
$countErrors = 0;
7777
$dispError = "";
78-
if( isset($_POST['submit']) && $_POST['submit'] != "block" ) {
78+
if( ($_POST['submit'] ?? '') && $_POST['submit'] != "block" ) {
7979
// Check Required Fields not Blank
8080
$arrRequiredFields = array("Your Name"=>"requestername", "Your E-mail"=>"requesteremail", "Clan Name"=>"clanname", "Diplomacy Status"=>"diplomacystatus", "Games Played"=>"gamesplayed", "Clan Leaders"=>"clanleaders");
8181

@@ -206,7 +206,7 @@
206206
}
207207

208208

209-
if ( ! isset($_POST['submit']) ) {
209+
if ( ! ($_POST['submit'] ?? '') ) {
210210
echo "
211211
212212
<div class='formDiv'>

src/forum/search.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ function check_filter_boards() {
256256
$formObj = new Form($setupFormArgs);
257257

258258

259-
if(isset($_POST['submit']) && $formObj->validate()) {
259+
if(($_POST['submit'] ?? '') && $formObj->validate()) {
260260
$_SESSION['btLastSearch'] = time();
261261

262262
define("SHOW_SEARCHRESULTS", true);

src/login.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
$x = '';
3131

32-
if(isset($_POST['submit'])) {
32+
if(($_POST['submit'] ?? '')) {
3333
$login_username = $_POST['user'];
3434
$login_password = $_POST['pass'];
3535
$x = "fail";
@@ -75,7 +75,7 @@
7575
}
7676

7777

78-
if(!isset($_POST['submit']) && !constant("LOGGED_IN")) {
78+
if(!($_POST['submit'] ?? '') && !constant("LOGGED_IN")) {
7979

8080
if($x == "fail") {
8181
$errorMessage = "You entered an incorrect username/password combination!";

src/members/console.form.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
$hooksObj->run("console_forms");
66
$formObj->buildForm($setupFormArgs);
77

8-
if( isset($_POST['submit']) ) {
8+
if( ($_POST['submit'] ?? '') ) {
99
if($formObj->save()) {
1010

1111
$formObj->saveMessageTitle = $consoleInfo['pagetitle'];
@@ -23,6 +23,6 @@
2323
}
2424
}
2525

26-
if ( ! isset($_POST['submit']) ) {
26+
if ( ! ($_POST['submit'] ?? '') ) {
2727
$formObj->show();
2828
}

src/members/events/addposition.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
$dispError = "";
4747
$countErrors = 0;
4848

49-
if(isset($_POST['submit'])) {
49+
if(($_POST['submit'] ?? '')) {
5050

5151
// Check position name
5252
if(trim($_POST['positionname']) == "") {
@@ -105,7 +105,7 @@
105105
}
106106

107107

108-
if(!isset($_POST['submit'])) {
108+
if(!($_POST['submit'] ?? '')) {
109109

110110
$arrPositions = $eventObj->getPositions(" ORDER BY sortnum");
111111

src/members/events/editinfo.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
$arrTimezones = DateTimeZone::listIdentifiers();
4747
$eventInfo = $eventObj->get_info_filtered();
48-
if(isset($_POST['submit'])) {
48+
if(($_POST['submit'] ?? '')) {
4949
// Check Title
5050
if(trim($_POST['eventtitle']) == "") {
5151
$dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Event title may not be blank.<br>";
@@ -162,7 +162,7 @@
162162
}
163163

164164

165-
if(!isset($_POST['submit'])) {
165+
if(!($_POST['submit'] ?? '')) {
166166

167167
$startHour = date("G", $eventInfo['startdate']);
168168
$startMinute = date("i", $eventInfo['startdate']);

src/members/events/include/manageinvites_form.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
$countErrors = 0;
4646
$dispError = "";
47-
if(isset($_POST['submit'])) {
47+
if(($_POST['submit'] ?? '')) {
4848

4949
$arrColumns = array();
5050
$arrValues = array();
@@ -157,7 +157,7 @@
157157
<input type='button' class='submitButton' onclick='btnSaveClicked()' value='Save' style='width: 100px' id='btnSave'>
158158
";
159159

160-
if(isset($_POST['submit']) && $countErrors == 0) {
160+
if(($_POST['submit'] ?? '') && $countErrors == 0) {
161161

162162
echo "
163163
<p class='successFont' align='center'>
@@ -202,7 +202,7 @@
202202
";
203203

204204

205-
if(isset($_POST['submit']) && $countErrors > 0) {
205+
if(($_POST['submit'] ?? '') && $countErrors > 0) {
206206

207207
echo "
208208

src/members/events/include/manageposition_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
$countErrors = 0;
4848
$dispError = "";
4949

50-
if(isset($_POST['submit'])) {
50+
if(($_POST['submit'] ?? '')) {
5151

5252
// Check position name
5353
if(trim($_POST['positionname']) == "") {
@@ -111,7 +111,7 @@
111111

112112
}
113113

114-
if(!isset($_POST['submit'])) {
114+
if(!($_POST['submit'] ?? '')) {
115115

116116

117117
$arrPositions = $eventObj->getPositions(" ORDER BY sortnum");

src/members/events/invitemembers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
$countErrors = 0;
4747
$objInviteMember = new Member($mysqli);
4848

49-
if(isset($_POST['submit'])) {
49+
if(($_POST['submit'] ?? '')) {
5050

5151

5252
foreach($_SESSION['btInviteList'] as $value) {
@@ -99,7 +99,7 @@
9999
}
100100

101101

102-
if(!isset($_POST['submit'])) {
102+
if(!($_POST['submit'] ?? '')) {
103103

104104
$_SESSION['btEventID'] = $eventInfo['event_id'];
105105

0 commit comments

Comments
 (0)