Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
e0533d2e
Commit
e0533d2e
authored
Feb 03, 2021
by
pupi1985
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #882 - Error thrown on PHP 8 when attempting to count() null values
parent
c478a0dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
hot.php
qa-include/pages/hot.php
+1
-1
unanswered.php
qa-include/pages/unanswered.php
+1
-1
qa-feed.php
qa-include/qa-feed.php
+2
-2
No files found.
qa-include/pages/hot.php
View file @
e0533d2e
...
...
@@ -31,7 +31,7 @@ require_once QA_INCLUDE_DIR . 'app/q-list.php';
// Get list of hottest questions, allow per-category if QA_ALLOW_UNINDEXED_QUERIES set in qa-config.php
$categoryslugs
=
QA_ALLOW_UNINDEXED_QUERIES
?
qa_request_parts
(
1
)
:
null
;
$countslugs
=
@
count
(
$categoryslugs
);
$countslugs
=
$categoryslugs
===
null
?
null
:
count
(
$categoryslugs
);
$start
=
qa_get_start
();
$userid
=
qa_get_logged_in_userid
();
...
...
qa-include/pages/unanswered.php
View file @
e0533d2e
...
...
@@ -36,7 +36,7 @@ if (QA_ALLOW_UNINDEXED_QUERIES)
else
$categoryslugs
=
null
;
$countslugs
=
@
count
(
$categoryslugs
);
$countslugs
=
$categoryslugs
===
null
?
null
:
count
(
$categoryslugs
);
$by
=
qa_get
(
'by'
);
$start
=
qa_get_start
();
$userid
=
qa_get_logged_in_userid
();
...
...
qa-include/qa-feed.php
View file @
e0533d2e
...
...
@@ -74,7 +74,7 @@ function qa_feed_not_found()
function
qa_feed_load_ifcategory
(
$categoryslugs
,
$allkey
,
$catkey
,
&
$title
,
$questionselectspec1
=
null
,
$questionselectspec2
=
null
,
$questionselectspec3
=
null
,
$questionselectspec4
=
null
)
{
$countslugs
=
@
count
(
$categoryslugs
);
$countslugs
=
$categoryslugs
===
null
?
null
:
count
(
$categoryslugs
);
list
(
$questions1
,
$questions2
,
$questions3
,
$questions4
,
$categories
,
$categoryid
)
=
qa_db_select_with_pending
(
$questionselectspec1
,
...
...
@@ -165,7 +165,7 @@ switch ($feedtype) {
break
;
}
$countslugs
=
@
count
(
$categoryslugs
);
$countslugs
=
$categoryslugs
===
null
?
null
:
count
(
$categoryslugs
);
if
(
!
isset
(
$feedoption
))
qa_feed_not_found
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment