|
276 | 276 | $jumptoanchor = 'a' . $formpostid; |
277 | 277 |
|
278 | 278 | } elseif ($formtype == 'a_add' || ($question['answerbutton'] && !$formrequested)) { |
279 | | - $qa_content['a_form'] = qa_page_q_add_a_form($qa_content, 'anew', $captchareason, $question, @$anewin, @$anewerrors, $formtype == 'a_add', $formrequested); |
| 279 | + $qa_content['a_form'] = qa_page_q_add_a_form($qa_content, 'anew', $captchareason, $question, @$anewin, $anewerrors ?? [], $formtype == 'a_add', $formrequested); |
280 | 280 |
|
281 | 281 | if ($formrequested) { |
282 | 282 | $jumptoanchor = 'anew'; |
|
291 | 291 | // Prepare content for comments on the question, plus add or edit comment forms |
292 | 292 |
|
293 | 293 | if ($formtype == 'q_close') { |
294 | | - $qa_content['q_view']['c_form'] = qa_page_q_close_q_form($qa_content, $question, 'close', @$closein, @$closeerrors); |
| 294 | + $qa_content['q_view']['c_form'] = qa_page_q_close_q_form($qa_content, $question, 'close', @$closein, $closeerrors ?? []); |
295 | 295 | $jumptoanchor = 'close'; |
296 | 296 |
|
297 | 297 | } elseif (($formtype == 'c_add' && $formpostid == $questionid) || ($question['commentbutton'] && !$formrequested)) { // ...to be added |
298 | 298 | $qa_content['q_view']['c_form'] = qa_page_q_add_c_form($qa_content, $question, $question, 'c' . $questionid, |
299 | | - $captchareason, @$cnewin[$questionid], @$cnewerrors[$questionid], $formtype == 'c_add'); |
| 299 | + $captchareason, @$cnewin[$questionid], $cnewerrors[$questionid] ?? [], $formtype == 'c_add'); |
300 | 300 |
|
301 | 301 | if ($formtype == 'c_add' && $formpostid == $questionid) { |
302 | 302 | $jumptoanchor = 'c' . $questionid; |
|
305 | 305 |
|
306 | 306 | } elseif ($formtype == 'c_edit' && @$commentsfollows[$formpostid]['parentid'] == $questionid) { // ...being edited |
307 | 307 | $qa_content['q_view']['c_form'] = qa_page_q_edit_c_form($qa_content, 'c' . $formpostid, $commentsfollows[$formpostid], |
308 | | - @$ceditin[$formpostid], @$cediterrors[$formpostid]); |
| 308 | + @$ceditin[$formpostid], $cediterrors[$formpostid] ?? []); |
309 | 309 |
|
310 | 310 | $jumptoanchor = 'c' . $formpostid; |
311 | 311 | $commentsall = $questionid; |
|
0 commit comments