Jump to content

Recommended Posts

Posted (edited)

I'm getting error reports from some users and seeing a number of system logs with the following error after upgrading from .15 to .16, with URL being the front page:

TypeError: round(): Argument #1 ($num) must be of type int|float, string given (0)
#0 /usr/src/ips/system/Lang/Lang.php(935): round()
#1 /usr/src/ips/system/Lang/Lang.php(874): IPS\_Lang->formatNumberShort()
#2 [internal function]: IPS\_Lang->IPS\{closure}()
#3 /usr/src/ips/system/Lang/Lang.php(828): preg_replace_callback()
#4 /usr/src/ips/system/Lang/Lang.php(1934): IPS\_Lang->pluralize()
#5 /usr/src/ips/system/Lang/Lang.php(1713): IPS\_Lang->replaceWords()
#6 /usr/src/ips/system/Widget/Widget.php(889): IPS\_Lang->parseOutputForDisplay()
#7 /usr/src/ips/system/Theme/Theme.php(885) : eval()'d code(19030): IPS\_Widget->__toString()
#8 /usr/src/ips/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->widgetContainer()
#9 /usr/src/ips/system/Theme/Theme.php(885) : eval()'d code(7269): IPS\Theme\_SandboxedTemplate->__call()
#10 /usr/src/ips/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->globalTemplate()
#11 /usr/src/ips/system/Dispatcher/Dispatcher.php(173): IPS\Theme\_SandboxedTemplate->__call()
#12 /usr/src/ips/system/Dispatcher/Standard.php(113): IPS\_Dispatcher->finish()
#13 /usr/src/ips/system/Dispatcher/Front.php(558): IPS\Dispatcher\_Standard->finish()
#14 /usr/src/ips/system/Dispatcher/Dispatcher.php(155): IPS\Dispatcher\_Front->finish()
#15 /usr/src/ips/index.php(13): IPS\_Dispatcher->run()
#16 {main}

and backtrace:

#0 /usr/src/ips/init.php(1036): IPS\_Log::log()
#1 /usr/src/ips/system/Widget/Widget.php(939): IPS\IPS::exceptionHandler()
#2 /usr/src/ips/system/Theme/Theme.php(885) : eval()'d code(19030): IPS\_Widget->__toString()
#3 /usr/src/ips/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->widgetContainer()
#4 /usr/src/ips/system/Theme/Theme.php(885) : eval()'d code(7269): IPS\Theme\_SandboxedTemplate->__call()
#5 /usr/src/ips/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->globalTemplate()
#6 /usr/src/ips/system/Dispatcher/Dispatcher.php(173): IPS\Theme\_SandboxedTemplate->__call()
#7 /usr/src/ips/system/Dispatcher/Standard.php(113): IPS\_Dispatcher->finish()
#8 /usr/src/ips/system/Dispatcher/Front.php(558): IPS\Dispatcher\_Standard->finish()
#9 /usr/src/ips/system/Dispatcher/Dispatcher.php(155): IPS\Dispatcher\_Front->finish()
#10 /usr/src/ips/index.php(13): IPS\_Dispatcher->run()
#11 {main}

I've attempted to sign in as these users via the ACP, but that does not reproduce the issue on my end, and the user only sees the white generic error screen (500). I'm hoping this is enough information to track down the issue.

Possibly related to this other issue (which we also ran into) as both have something to do with short number formatting:

Edited by 3ventic
Posted (edited)

This is a different error, though the root cause may be the same (that I can't confirm). The impact of this is much more severe as the entire forum is inaccessible to the user impacted by it. The linked issue only prevents the links to the impacted sub-forums from showing up in the template, which catches the error. This error is uncaught and results in a full 500.

Edited by 3ventic
Posted
Marc
This post was recognized by Marc!

DawPi was awarded the badge 'Helpful' and 5 points.

This is the same.

Open forumRow template bit, find:

Find:

{{$count = \IPS\forums\Topic::contentCount( $forum, TRUE );}}

Change to:

{{$count = (int) \IPS\forums\Topic::contentCount( $forum, TRUE );}}

 

Does it help?

Posted
3 hours ago, DawPi said:

This is the same.

Open forumRow template bit, find:

Find:

{{$count = \IPS\forums\Topic::contentCount( $forum, TRUE );}}

Change to:

{{$count = (int) \IPS\forums\Topic::contentCount( $forum, TRUE );}}

 

Does it help?

Yes, did the trick.... temporally fixed...

Thank you so much... 

Posted
12 hours ago, DawPi said:

This is the same.

Open forumRow template bit, find:

Find:

{{$count = \IPS\forums\Topic::contentCount( $forum, TRUE );}}

Change to:

{{$count = (int) \IPS\forums\Topic::contentCount( $forum, TRUE );}}

 

Does it help?

forumRow template is already changed. This is a different error.

Posted

Please make sure you revert these template changes.

We have released a patch to address this issue. Please go to AdminCP > System > Support and apply the patch from the first/top left box. If you do not see an option to install the patch, you already have the latest release.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...