Two fixes and one minor feature - #2
Merged
Merged
Conversation
added 8 commits
January 31, 2012 20:33
…d duplicate js function selectBoards (defined in script.js) from Profile.template.php
…greSQL and SQlite [Bug 4826]
…nks Dragooon through Arantor
emanuele45
pushed a commit
that referenced
this pull request
Jul 2, 2012
Need to get the hang of using branches, I keep forgetting to make sure I'm changing the right one...
Oldiesmann
pushed a commit
that referenced
this pull request
Apr 21, 2014
Dragooon
pushed a commit
that referenced
this pull request
Jun 22, 2014
SQL Query not needed for guests since they can not be a group moderator
MissAllSunday
added a commit
that referenced
this pull request
Nov 11, 2015
[WIP] Some improvements from me
Closed
This was referenced Sep 8, 2017
Merged
Closed
Closed
This was referenced Aug 5, 2020
Closed
Closed
This was referenced Feb 3, 2025
jdarwood007
pushed a commit
that referenced
this pull request
Aug 8, 2026
browse() reads the emulation version list out of admin_info_files, where the copy
fetched from simplemachines.org is cached, and hands it straight to preg_replace()
and then in_array(). A forum that has never managed to fetch it has an empty row,
jsonDecode() returns null, preg_replace() gives back null rather than an array,
and the page dies:
in_array(): Argument #2 ($haystack) must be of type array, string given
That is the state of every fresh install until the first successful fetch, and the
permanent state of any forum without outbound access. Falls back to an empty list,
which the line below already handles by adding the current version to it.
Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
Sesquipedalian
pushed a commit
that referenced
this pull request
Aug 14, 2026
ErrorHandlerService::log() json encodes the backtrace before storing it.
The backtraces it collects itself pass DEBUG_BACKTRACE_IGNORE_ARGS, but
that only applies when no backtrace was supplied:
$backtrace = $backtrace ?? debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
catch() supplies one, from Throwable::getTrace(), and that keeps both the
call arguments and the bound objects. Two consequences:
Anything a member submitted can end up in the error log, including the
password posted to the login form, since it is simply an argument a few
frames down.
Encoding an object reads its properties, which can throw. When it does,
the new error arrives while the first one is still being logged, and an
error that would only have been logged becomes an uncaught fatal that
hides the original. That is what turned a background task failure into a
white page for logged in members:
Uncaught Error: Cannot access uninitialized non-nullable property
SMF\User::$username by reference
#1 Sources/Utils.php(1539): json_encode(Array, 0, 512)
#2 ErrorHandlerService.php(286): SMF\Utils::jsonEncode(Array)
#3 ErrorHandlerService.php(185): ...->log('Cannot access u...')
Drops both keys from every frame before encoding. File, line, function
and class are kept, which is what the log is for.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug: 0004823: search error string prints %1$d (http://dev.simplemachines.org/mantis/view.php?id=4823)
And mod http://custom.simplemachines.org/mods/index.php?mod=3120
Bug: 0004826: postgreSQL and SQLite types replacement (http://dev.simplemachines.org/mantis/view.php?id=4826)