News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Nested Function Argument Misplacement

Started by bsmither, March 15, 2022, 04:25:29 PM

Previous topic - Next topic

bsmither

In SMF2.1.1, Load.php, near line 3130, there is:
log_error(sprintf($txt['theme_language_error'], $template_name . '.' . $lang, 'template'));PHP Notice:  Trying to access array offset on value of type null in Sources/Load.php on line 3130
PHP Stack trace:
1. {main}() index.php:0
2. AutoTask() index.php:163
3. scheduled_daily_digest() Sources/ScheduledTasks.php:116
4. loadEssentialThemeData() Sources/ScheduledTasks.php:308
5. loadLanguage($template_name = 'index+Modifications', $lang = *uninitialized*, $fatal = *uninitialized*, $force_reload = *uninitialized*) Sources/ScheduledTasks.php:1042

The 'template' argument is being given to sprintf(), but should be given to log_error().

Advertisement: