Calendar __toString() must not throw an exception

Mouth

Member
XF v1.5.23
Calendar v1.0.11

Code:
Server Error Log
Error Info
ErrorException: Fatal Error: Method XenForo_Template_Public::__toString() must not throw an exception, caught TypeError: Argument 1 passed to XenForo_Template_Helper_Core::helperAvatarHtml() must be of the type array, int given, called in library/XenForo/Template/Helper/Core.php on line 853 - internal_data/templates/S.17,L.3,nf_calendar_event_view.php:0
Generated By: Unknown Account, 55 minutes ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
  ["url"] => string(88) "/events/sadr-the-new-ss-route-gippsland.2775/responses?type=going"
  ["_GET"] => array(2) {
    ["/events/sadr-the-new-ss-route-gippsland_2775/responses"] => string(0) ""
    ["type"] => string(5) "going"
  }
  ["_POST"] => array(0) {
  }
}
 
Weird, but I think I know what's happened here. Would you mind checking (via sql) who's RSVP'd as going to the event?
 
Would you mind checking (via sql) who's RSVP'd as going to the event?
It was a fatal Error, so didn't reach SQL, and thus the users action not taken/recorded ....
Code:
mysql> select * from xf_nf_event_response where event_id = 2775;
+-------------+----------+---------+----------+---------------+---------+
| response_id | event_id | user_id | response | response_date | alerted |
+-------------+----------+---------+----------+---------------+---------+
|        3805 |     2775 |   28962 | declined |    1545371936 |       0 |
+-------------+----------+---------+----------+---------------+---------+
1 row in set (0.00 sec)

The event was also Dec 22nd, so RSVP'ing on Jan 30th shouldn't have been possible.
 
I can't reproduce this unless I manually hardcode some bad data to trigger it. Does this only happen on one event? If so, could you link it?
 
Does this only happen on one event?
No. Here's another ...
Code:
Server Error Log
Error Info
ErrorException: Fatal Error: Method XenForo_Template_Public::__toString() must not throw an exception, caught TypeError: Argument 1 passed to XenForo_Template_Helper_Core::helperAvatarHtml() must be of the type array, int given, called in library/XenForo/Template/Helper/Core.php on line 853 - internal_data/templates/S.17,L.3,nf_calendar_event_view.php:0
Generated By: Unknown Account, 25 minutes ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
  ["url"] => string(65) "/events/another-epic-sunday.2527/responses"
  ["_GET"] => array(1) {
    ["/events/another-epic-sunday_2527/responses"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

This is an event from Apr 23, 2017 at 09:00 → 17:00 ! The only responses URL I can find on the page (both hyperlink and within HTML code) is /events/another-epic-sunday.2527/responses?type=declined with the type parameter.

If i visit the URL with parameter - /events/another-epic-sunday.2527/responses - then I get an 'HTTP ERROR 500' displayed in my browser and an immediate error log entry for it.


And another for a different event ...
Code:
Server Error Log
Error Info
ErrorException: Fatal Error: Method XenForo_Template_Public::__toString() must not throw an exception, caught TypeError: Argument 1 passed to XenForo_Template_Helper_Core::helperAvatarHtml() must be of the type array, int given, called in library/XenForo/Template/Helper/Core.php on line 853 - internal_data/templates/S.17,L.3,nf_calendar_event_view.php:0
Generated By: Unknown Account, 7 minutes ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
  ["url"] => string(76) "/events/2013-breakfast-torque.1993/responses?type=134"
  ["_GET"] => array(2) {
    ["/events/2013-breakfast-torque_1993/responses"] => string(0) ""
    ["type"] => string(3) "134"
  }
  ["_POST"] => array(0) {
  }
}

Strange parameter on that URL? Is that something that could be generated from this add-on, or is something really strange hitting that URL? Hack attempts?
 
Last edited:
Another example ...
Code:
Server Error Log
Error Info
ErrorException: Fatal Error: Method XenForo_Template_Public::__toString() must not throw an exception, caught TypeError: Argument 1 passed to XenForo_Template_Helper_Core::helperAvatarHtml() must be of the type array, int given, called in library/XenForo/Template/Helper/Core.php on line 853 - internal_data/templates/S.17,L.3,nf_calendar_event_view.php:0
Generated By: Unknown Account, Today at 03:48
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
  ["url"] => string(117) "/events/jindy-2019-open-for-business-official-room-booking-thread.2788/responses?type=declined"
  ["_GET"] => array(2) {
    ["/events/jindy-2019-open-for-business-official-room-booking-thread_2788/responses"] => string(0) ""
    ["type"] => string(8) "declined"
  }
  ["_POST"] => array(0) {
  }
}

RSVP isn't open/applicable for this event!
 
It's nothing related to RSVP. :)

I've sorted this now in the next version, thanks!
 
Back
Top