Repository navigation
Conversation
The theme copy page notes which of the default theme's language files a theme already has, and whether each can be overwritten. It built the path to check from the array describing the file rather than from the file, which logged "Array to string conversion" for every language file the theme had, and checked a path that does not exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
albertlast
added a commit
to albertlast/SMF2.1
that referenced
this pull request
Oct 5, 2026
profile_track_ip pinned a fatal that SimpleMachines#9718 has fixed, so it now records the page. features_basic and profile_theme show the time zone select grouped by country. themes_copy lists the new TimeZoneSelect template and no longer logs an array to string conversion, which SimpleMachines#9720 fixed. Co-Authored-By: Claude Opus 5.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.
Description
Themes::copy()(Admin → Themes → Modify themes → theme → Copy a template) also works out which of the default theme's language files the theme already has, and whether each could be overwritten:$entryis the array describing the file, not its name, so every visit logsArray to string conversiononce per language file the theme has (twice on a stock forum, for the default theme itself), and the path checked is…/languages/Array. It now checks the file it is looking at.Tests
tests/Integration/Http/ThemeCopyListTest.phpopens the page as the administrator and asserts nothing was logged. Run locally on MySQL and PostgreSQL;tests/Integration/Httpis not part of the CI run yet.Not changed here
The language files are only half a feature, and have been since 2.1.
template_copy_template()never showsavailable_language_files, so there is no link to copy one. The copy itself cannot work either: it only accepts alang_filewhose name is a single character each side of a dot, and reads the source from$_REQUEST['template']instead. 2.1.7 has the same code. Whether to finish it or remove it seems like a separate decision, so this only stops the warning.#9717 changes the same method, in a different place.
Issues References (Fixes|Related|Closes)
Related: #9717
🤖 Generated with Claude Code