Skip to content

Commit f2b688a

Browse files
committed
Fix error with user update page
1 parent ca27d3d commit f2b688a

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/templates/User/Update.phtml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $description = 'This form allows an individual to update their account '
1010
. 'information.';
1111
$this->opengraph->attach(new Pair('url', '/user/update'));
1212

13-
switch ($this->getContext()->username_error[1]) {
13+
switch ($this->getContext()->username_error[1] ?? null) {
1414
case null: case '': $username_error = ''; break;
1515
case 'USERNAME_LONG':
1616
$username_error = 'Your chosen username is too long.'; break;
@@ -26,7 +26,7 @@ switch ($this->getContext()->username_error[1]) {
2626
. $this->getContext()->username_error[1];
2727
}
2828

29-
switch ($this->getContext()->email_error[1]) {
29+
switch ($this->getContext()->email_error[1] ?? null) {
3030
case null: case '': $email_error = ''; break;
3131
case 'MISMATCH':
3232
$email_error = 'Emails do not match, check for typos.'; break;
@@ -46,7 +46,7 @@ switch ($this->getContext()->email_error[1]) {
4646
. $this->getContext()->email_error[1];
4747
}
4848

49-
switch ($this->getContext()->display_name_error[1]) {
49+
switch ($this->getContext()->display_name_error[1] ?? null) {
5050
case null: case '': $display_name_error = ''; break;
5151
case 'CHANGE_FAILED':
5252
$display_name_error = 'Failed to change display name.'; break;
@@ -61,7 +61,7 @@ switch ($this->getContext()->display_name_error[1]) {
6161
. $this->getContext()->display_name_error[1];
6262
}
6363

64-
switch ($this->getContext()->biography_error[1]) {
64+
switch ($this->getContext()->biography_error[1] ?? null) {
6565
case null: case '': $biography_error = ''; break;
6666
case 'TOO_LONG':
6767
$biography_error = 'Your biography is too long.'; break;
@@ -72,7 +72,7 @@ switch ($this->getContext()->biography_error[1]) {
7272
. $this->getContext()->biography_error[1];
7373
}
7474

75-
switch ($this->getContext()->discord_username_error[1]) {
75+
switch ($this->getContext()->discord_username_error[1] ?? null) {
7676
case null: case '': $discord_username_error = ''; break;
7777
case 'TOO_LONG':
7878
$discord_username_error = 'Your Discord username is too long.'; break;
@@ -83,7 +83,7 @@ switch ($this->getContext()->discord_username_error[1]) {
8383
. $this->getContext()->discord_username_error[1];
8484
}
8585

86-
switch ($this->getContext()->facebook_username_error[1]) {
86+
switch ($this->getContext()->facebook_username_error[1] ?? null) {
8787
case null: case '': $facebook_username_error = ''; break;
8888
case 'TOO_LONG':
8989
$facebook_username_error = 'Your Facebook username is too long.'; break;
@@ -94,7 +94,7 @@ switch ($this->getContext()->facebook_username_error[1]) {
9494
. $this->getContext()->facebook_username_error[1];
9595
}
9696

97-
switch ($this->getContext()->github_username_error[1]) {
97+
switch ($this->getContext()->github_username_error[1] ?? null) {
9898
case null: case '': $github_username_error = ''; break;
9999
case 'TOO_LONG':
100100
$github_username_error = 'Your Github username is too long.'; break;
@@ -105,7 +105,7 @@ switch ($this->getContext()->github_username_error[1]) {
105105
. $this->getContext()->github_username_error[1];
106106
}
107107

108-
switch ($this->getContext()->instagram_username_error[1]) {
108+
switch ($this->getContext()->instagram_username_error[1] ?? null) {
109109
case null: case '': $instagram_username_error = ''; break;
110110
case 'TOO_LONG':
111111
$instagram_username_error = 'Your Instagram username is too long.'; break;
@@ -116,7 +116,7 @@ switch ($this->getContext()->instagram_username_error[1]) {
116116
. $this->getContext()->instagram_username_error[1];
117117
}
118118

119-
switch ($this->getContext()->phone_error[1]) {
119+
switch ($this->getContext()->phone_error[1] ?? null) {
120120
case null: case '': $phone_error = ''; break;
121121
case 'TOO_LONG':
122122
$phone_error = 'Your phone number is too long.'; break;
@@ -127,7 +127,7 @@ switch ($this->getContext()->phone_error[1]) {
127127
. $this->getContext()->phone_error[1];
128128
}
129129

130-
switch ($this->getContext()->reddit_username_error[1]) {
130+
switch ($this->getContext()->reddit_username_error[1] ?? null) {
131131
case null: case '': $reddit_username_error = ''; break;
132132
case 'TOO_LONG':
133133
$reddit_username_error = 'Your Reddit username is too long.'; break;
@@ -138,7 +138,7 @@ switch ($this->getContext()->reddit_username_error[1]) {
138138
. $this->getContext()->reddit_username_error[1];
139139
}
140140

141-
switch ($this->getContext()->skype_username_error[1]) {
141+
switch ($this->getContext()->skype_username_error[1] ?? null) {
142142
case null: case '': $skype_username_error = ''; break;
143143
case 'TOO_LONG':
144144
$skype_username_error = 'Your Skype username is too long.'; break;
@@ -149,7 +149,7 @@ switch ($this->getContext()->skype_username_error[1]) {
149149
. $this->getContext()->skype_username_error[1];
150150
}
151151

152-
switch ($this->getContext()->steam_id_error[1]) {
152+
switch ($this->getContext()->steam_id_error[1] ?? null) {
153153
case null: case '': $steam_id_error = ''; break;
154154
case 'TOO_LONG':
155155
$steam_id_error = 'Your Steam Id is too long.'; break;
@@ -160,7 +160,7 @@ switch ($this->getContext()->steam_id_error[1]) {
160160
. $this->getContext()->steam_id_error[1];
161161
}
162162

163-
switch ($this->getContext()->twitter_username_error[1]) {
163+
switch ($this->getContext()->twitter_username_error[1] ?? null) {
164164
case null: case '': $twitter_username_error = ''; break;
165165
case 'TOO_LONG':
166166
$twitter_username_error = 'Your Twitter username is too long.'; break;
@@ -171,7 +171,7 @@ switch ($this->getContext()->twitter_username_error[1]) {
171171
. $this->getContext()->twitter_username_error[1];
172172
}
173173

174-
switch ($this->getContext()->website_error[1]) {
174+
switch ($this->getContext()->website_error[1] ?? null) {
175175
case null: case '': $website_error = ''; break;
176176
case 'TOO_LONG':
177177
$website_error = 'Your website url is too long.'; break;

0 commit comments

Comments
 (0)