Skip to content

Commit 747827e

Browse files
committed
Fix Notices on PHP 7.4
1 parent c2d4be5 commit 747827e

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

qa-include/pages/question-view.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ function qa_page_q_add_c_form(&$qa_content, $question, $parent, $formid, $captch
11281128
qa_set_up_name_field($qa_content, $form['fields'], @$in['name'], $prefix);
11291129

11301130
qa_set_up_notify_fields($qa_content, $form['fields'], 'C', qa_get_logged_in_email(),
1131-
isset($in['notify']) ? $in['notify'] : qa_opt('notify_users_default'), $in['email'], @$errors['email'], $prefix);
1131+
isset($in['notify']) ? $in['notify'] : qa_opt('notify_users_default'), @$in['email'], @$errors['email'], $prefix);
11321132

11331133
$onloads = array();
11341134

qa-include/pages/question.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
list($question, $childposts, $achildposts, $parentquestion, $closepost, $duplicateposts, $extravalue, $categories, $favorite) = $questionData;
7171

7272

73-
if ($question['basetype'] != 'Q') // don't allow direct viewing of other types of post
73+
if (isset($question['basetype']) && $question['basetype'] != 'Q') // don't allow direct viewing of other types of post
7474
$question = null;
7575

7676
if (isset($question)) {

qa-include/pages/tag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282

8383
$qa_content['canonical'] = qa_get_canonical();
8484

85-
$qa_content['page_links'] = qa_html_page_links(qa_request(), $start, $pagesize, $tagword['tagcount'], qa_opt('pages_prev_next'));
85+
$qa_content['page_links'] = qa_html_page_links(qa_request(), $start, $pagesize, isset($tagword['tagcount']) ? $tagword['tagcount'] : 0, qa_opt('pages_prev_next'));
8686

8787
if (empty($qa_content['page_links']))
8888
$qa_content['suggest_next'] = qa_html_suggest_qs_tags(true);

0 commit comments

Comments
 (0)