Skip to content

[3.0] Lets recent posts be narrowed to a list of boards again - #9713

Merged
live627 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/recent-boards-list
Oct 1, 2026
Merged

live627 merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/recent-boards-list

Conversation

@albertlast

Copy link
Copy Markdown
Collaborator

Description

?action=recent;boards=… returns a 500 for any value, a single board included:

explode(): Argument #2 ($string) must be of type string, array given

Recent::execute() converts $_REQUEST['boards'] from a comma separated list into an array of integers. Recent::getBoards() then converted it a second time with explode(), which on PHP 8 is a TypeError on an array. 2.1 did the conversion once, in the equivalent of getBoards(); the 3.0 port added the one in execute() and kept the old one. This removes the second, since the first already leaves exactly what the query needs. The category branch (;c=) was never affected: getBoards() does not convert that one again.

The regression test is an HTTP test, because the page is the thing that broke. It asks for one board and for a list of two, and fails with a 500 on both without the change:

?action=recent;boards=1 returned 500 from http://localhost
?action=recent;boards=1,2 returned 500 from http://localhost

Found while building the template snapshot tests in #9712.

Issues References (Fixes|Related|Closes)

Related: #9712

🤖 Generated with Claude Code

?action=recent;boards= was a 500 for any value. Recent::execute() turns
the comma separated list into an array of integers, and getBoards() then
ran explode() over it a second time, which is a TypeError on an array.
The second conversion goes, since the first has already done its job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
@live627
live627 merged commit b3723c8 into SimpleMachines:release-3.0 Oct 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants