Few minor bug fixes - #1
Merged
Merged
Conversation
added 5 commits
January 29, 2012 18:49
…typo in Profile-Actions.php
…ly for the uninstalled package [topic 453027]
Spuds
added a commit
that referenced
this pull request
Jan 29, 2012
! $board not reassigned in MEssageIndex.php [Bug 4929] ! Fatal error accessing stat page if stats are disabled [Bug 4742] + typo in Profile-Actions.php ! No more errors when pruning attachments without notice [Bug 4818] ! When pacakges are uninstalled, the time_removed field is updated only for the uninstalled package [topic 453027]
emanuele45
pushed a commit
that referenced
this pull request
Jul 2, 2012
Hooks and button_strip stuffz
emanuele45
pushed a commit
that referenced
this pull request
Jul 29, 2012
emanuele45
added a commit
that referenced
this pull request
Sep 9, 2012
Update Themes/default/scripts/jquery.sceditor.bbcode.js
emanuele45
pushed a commit
that referenced
this pull request
Jan 8, 2013
Moved a bit of things around in Avatar.php and index.php
This was referenced Feb 4, 2015
Closed
MissAllSunday
pushed a commit
that referenced
this pull request
Jul 3, 2016
Merged
This was referenced Sep 8, 2017
Merged
Sesquipedalian
pushed a commit
that referenced
this pull request
Aug 18, 2023
PHP 8.1+ will generate the following error upon a failed database connection: ``` PHP Fatal error: Uncaught TypeError: mysqli_error(): Argument #1 ($mysql) must be of type mysqli, null given in /Sources/Errors.php:464 ``` To fix this, I built a wrapper to check to ensure that the we don't have a null argument going into the related function. Instead if its null and the primary connection is null, it returns a empty string, which is what the code seems to expect.
This was referenced Nov 5, 2023
Closed
jdarwood007
added a commit
that referenced
this pull request
Sep 12, 2025
I was receiving the following error: ``` ( ! ) Fatal error: Uncaught TypeError: mb_str_split(): Argument #1 ($string) must be of type string, int given in /Sources/Utils.php on line 1076 ```
Sesquipedalian
pushed a commit
that referenced
this pull request
Jul 29, 2026
The members table lost its time_offset column in 3.0, in the
DropTimeOffset migration, and User::$time_offset became a virtual
property derived from the member's time zone. User::setProperties() even
lists time_offset among the "obsolete data" it ignores.
CreatePost_Notify still asked the database for it:
mem.smiley_set, mem.time_format, mem.time_offset, mem.timezone,
so the query fails outright with "column mem.time_offset does not
exist", and the task dies on the fetch_assoc() of a false result. The
task is never marked done, so it is retried on later page loads and
takes down whichever request happens to run it:
SMF\Db\APIs\PostgreSQL::fetch_assoc(): Argument #1 ($result) must be
of type object, false given
Nobody watching a board or topic receives their notification either.
Derives the offset from mem.timezone, which the query already selects,
the same way User::$time_offset does. Also keys the parsed-message cache
by time zone rather than by offset, and drops an (int) cast that
truncated the offsets of half-hour and quarter-hour time zones.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.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>
Sesquipedalian
pushed a commit
that referenced
this pull request
Sep 5, 2026
Two faults in the same block of User::loadUserData(), one hiding the other.
The branch for the current user reads
if (($data = CacheApi::get('user_settings-' . $id, 60) == null))
which closes the assignment around the comparison, so $data is handed a bool
rather than the cached profile and the is_array() guard below throws it away.
The user_settings cache has therefore never been read since this was rewritten
as a class; 2.1 has the parentheses in the right place. Nothing looked wrong,
because a cache that is never read is only a cache that never helps.
With that corrected, the line below it starts fatalling for everyone rather
than only for other members at cache level 3:
SMF\UserDataset::tryFrom(): Argument #1 ($value) must be of type string,
SMF\UserDataset given
What goes into the cache is self::$profiles[$id], whose dataset entry is the
enum itself, so tryFrom() is being handed back exactly what was stored. At
level 3 this took out the board index, any board and any topic on the second
request, the first having populated the cache the second one read.
An entry that has no dataset at all still needs the fallback, so the
conversion stays for that case and is skipped when there is already an enum.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
Sesquipedalian
pushed a commit
that referenced
this pull request
Sep 6, 2026
The file cache writes its entries as JSON, and json_encode() returns false for anything it cannot represent, a string that is not valid UTF-8 above all. That false went straight on to the writer, which fatalled the request: TypeError: str_split(): Argument #1 ($string) must be of type string, false given Caching is documented as something that may miss and must not be depended on, so a value the store cannot hold is a value that does not get cached. It is not a reason to take the page down with it. The reachable case is a forum whose text is not clean UTF-8, which an upgrade from an older charset can easily leave behind. 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.
and another couple