Greetings. Bug: if a user enters a thread that is older than date X, and there is a warning in the editor about the old thread (implemented by the addon "Old Thread Warning"), then an error pops up in the admin panel (but not on a page).
Code:
TypeError: Template public:motw_notice_warning error: Argument 1 passed to Carbon\CarbonImmutable::singularUnit() must be of the type string, null given, called in /home/lamp/web/lamp-ret.club/public_html/src/addons/MMO/CoreLib/_vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php on line 53 src/addons/MMO/CoreLib/_vendor/nesbot/carbon/src/Carbon/Traits/Date.php:2423
Generated by: Unknown account Jun 29, 2022 at 12:00 AM
PHP:
Stack trace
#0 src/addons/MMO/CoreLib/_vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php(53): Carbon\CarbonImmutable::singularUnit(NULL)
#1 src/addons/MMO/CoreLib/_vendor/nesbot/carbon/src/Carbon/CarbonInterval.php(2604): Carbon\CarbonImmutable->roundUnit(NULL, 1, 'ceil')
#2 src/addons/MMO/CoreLib/_vendor/nesbot/carbon/src/Carbon/CarbonInterval.php(1618): Carbon\CarbonInterval->roundUnit(NULL, 1, 'ceil')
#3 src/addons/MMO/CoreLib/_vendor/nesbot/carbon/src/Carbon/Traits/Difference.php(827): Carbon\CarbonInterval->forHumans(2, '0', 1, '0200')
#4 src/addons/MMO/CoreLib/Template/TemplaterSetup.php(16): Carbon\Carbon->diffForHumans(NULL)
#5 src/XF/Template/Templater.php(1128): MMO\CoreLib\Template\TemplaterSetup->funcMclDiffForHuman(Object(SV\LiveContent\XF\Template\Templater), true, 1627532118, Array)
#6 internal_data/code_cache/templates/l6/s2/public/motw_notice_warning.php(38): XF\Template\Templater->func('mcl_diff_for_hu...', Array, true)
#7 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\LiveContent\XF\Template\Templater), Array, NULL)
#8 src/XF/Template/Templater.php(1680): XF\Template\Templater->renderTemplate('motw_notice_war...', Array)
#9 internal_data/code_cache/templates/l6/s2/public/quick_reply_macros.php(139): XF\Template\Templater->includeTemplate('public:motw_not...', Array)
#10 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(SV\LiveContent\XF\Template\Templater), Array, NULL)
#11 internal_data/code_cache/templates/l6/s2/public/quick_reply_macros.php(58): XF\Template\Templater->callMacro('quick_reply_mac...', 'editor', Array, Array)
#12 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(SV\LiveContent\XF\Template\Templater), Array, NULL)
#13 internal_data/code_cache/templates/l6/s2/public/thread_view.php(1016): XF\Template\Templater->callMacro('quick_reply_mac...', 'body', Array, Array)
#14 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\LiveContent\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#15 src/XF/Template/Templater.php(1642): XF\Template\Templater->renderTemplate('thread_view', Array, true, Object(XF\Template\ExtensionSet))
#16 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view_typ...', Array)
#17 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#18 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\\ViewT...', 'public:thread_v...', Array)
#19 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#20 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#21 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#22 src/XF/App.php(2352): XF\Mvc\Dispatcher->run()
#23 src/XF.php(524): XF\App->run()
#24 index.php(20): XF::runApp('XF\\Pub\\App')
#25 {main}
Code:
Request state
array(4) {
["url"] => string(25) "/t/help-me-unpack-it.351/"
["referrer"] => bool(false)
["_GET"] => array(1) {
["/t/help-me-unpack-it_351/"] => string(0) ""
}
["_POST"] => array(0) {
}
}