sadams101 Posted April 14 Posted April 14 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}
Marc Posted April 15 Posted April 15 You appear to have something stopping admin access. Please remove that temporarily while we take a look
sadams101 Posted April 15 Author Posted April 15 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.
Jim M Posted April 15 Posted April 15 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.
sadams101 Posted April 15 Author Posted April 15 Ok, I will do some more testing by disabling some apps and plugins and see if it is related to any of them. I'll report back what I find. Marc 1
Solution DawPi Posted April 20 Solution Posted April 20 (edited) To be honest, it's quite easy to reproduce. See this: 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 April 20 by DawPi opentype, sadams101 and SeNioR- 3
Jim M Posted April 20 Posted April 20 3 hours ago, DawPi said: To be honest, it's quite easy to reproduce. See this: 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. DawPi and sadams101 1 1
Marc Posted May 31 Posted May 31 This issue was resolved in our latest release of the platform. Please upgrade to resolve this, and if you see any further issues, please let us know. sadams101 1
Recommended Posts