Jump to content

Recommended Posts

Posted

I applied the latest patch yesterday, and since doing this I am seeing repeated errors in my logs. The timing could be coincidence. Today there are ~100 entries do far today.

The log entry was triggered by a guest (Guests)
The URL of page the error occurred on was https://www.mysite.com/?app=calendar&controller=view&csrfKey=1&get=byMonth&m=6&module=calendar&offset=0io4Ty4Oc&view=overview&y=2024


TypeError: array_slice(): Argument #2 ($offset) must be of type int, string given (0)
#0 /home/celiac/public_html/applications/calendar/modules/front/calendar/view.php(596): array_slice(Array, '0io4Ty4Oc', 50)
#1 /home/celiac/public_html/applications/calendar/modules/front/calendar/view.php(119): IPS\calendar\modules\front\calendar\_view->_viewOverview(Object(IPS\Helpers\Form))
#2 /home/celiac/public_html/system/Dispatcher/Controller.php(118): IPS\calendar\modules\front\calendar\_view->manage()
#3 /home/celiac/public_html/system/Dispatcher/Dispatcher.php(153): IPS\Dispatcher\_Controller->execute()
#4 /home/celiac/public_html/index.php(13): IPS\_Dispatcher->run()
#5 {main}

BACKTRACE
#0 /home/celiac/public_html/init.php(1036): IPS\_Log::log('TypeError: arra...', 'uncaught_except...')
#1 [internal function]: IPS\IPS::exceptionHandler(Object(TypeError))
#2 {main}

 

Posted

Sorry, I wasn't meaning to start a ticket here, just hoping to get some advice about what could be causing this, and to find out whether or not this is an issue for others as well.

Posted
51 minutes ago, sadams101 said:

Sorry, I wasn't meaning to start a ticket here, just hoping to get some advice about what could be causing this, and to find out whether or not this is an issue for others as well.

The answer would be this hasn’t been reported, no.

testing that URL local to my test environment, I am unable to even reproduce the error itself. Therefore, either this is something specific to your environment or some customization of the environment. You would want to restore the environment back to stock and provide us access if the issue is still present. 

  • Solution
Posted (edited)

To be honest, it's quite easy to reproduce. See this:

Could contain: Text, Page

Someone or something is attempting to "hack" or something on the board. In the code, you may try to find it at applications\calendar\modules\front\calendar\view.php:

	/* Pagination */
		$offset = isset( \IPS\Request::i()->offset ) ? min( array( \IPS\Request::i()->offset, \count( $events ) ) ) : 0;

As you can see, there is no check to ensure that the offset value is an integer. Please try changing it to:

		/* Pagination */
		$offset = isset( \IPS\Request::i()->offset ) ? \intval( \IPS\Request::i()->offset ) : 0;
        $offset = $offset ? min( array( $offset, \count( $events ) ) ) : 0;

Should help.

Edited by DawPi
Posted
3 hours ago, DawPi said:

To be honest, it's quite easy to reproduce. See this:

Could contain: Text, Page

Someone or something is attempting to "hack" or something on the board. In the code, you may try to find it at applications\calendar\modules\front\calendar\view.php:

	/* Pagination */
		$offset = isset( \IPS\Request::i()->offset ) ? min( array( \IPS\Request::i()->offset, \count( $events ) ) ) : 0;

As you can see, there is no check to ensure that the offset value is an integer. Please try changing it to:

		/* Pagination */
		$offset = isset( \IPS\Request::i()->offset ) ? \intval( \IPS\Request::i()->offset ) : 0;
        $offset = $offset ? min( array( $offset, \count( $events ) ) ) : 0;

Should help.

Thank you. I have reported what you mentioned here to our developers. However, I am unable to reproduce the exact error which has been originally reported. Therefore, we cannot guarantee this will resolve the OPs issue without access to their instance.

  • 1 month later...
  • Recently Browsing   0 members

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