Third party DateTimeZone::__construct(): Unknown or bad timezone () during user registration

iaresee

Active member
I appear to be getting an error others have seen during new user registration. However, in my case, I have haven't modified the register_form template for my site. It's, as far as I can tell, stock.

Free-tier NewRelic is mangling my stack trace, but this is still pretty decipherable:

Code:
E_WARNING: DateTimeZone::__construct(): Unknown or bad timezone ()

…nstruct called at /var/xenforo/public_html/library/XenForo/DataWriter/User.php (740)
in XenForo_DataWriter_User::_verifyTimezone called at ? (?)
…r_func_array called at /var/xenforo/public_html/library/XenForo/DataWriter.php (982)
…tionCallback called at /var/xenforo/public_html/library/XenForo/DataWriter.php (725)
…ldValueValid called at /var/xenforo/public_html/library/XenForo/DataWriter.php (643)
…aWriter::set called at /var/xenforo/public_html/library/XenForo/DataWriter.php (995)
…lled at /var/xenforo/public_html/library/XenForo/ControllerPublic/Register.php (370)
…egister called at /var/xenforo/public_html/library/XenForo/FrontController.php (351)
…ispatch called at /var/xenforo/public_html/library/XenForo/FrontController.php (134)
in XenForo_FrontController::run called at /var/xenforo/public_html/index.php (13)

It's happening on a call to /register/register on my site.

Add-ons in use seem pretty benign, but here they are for completeness:

Screen Shot 2015-10-30 at 10.13.47 PM.webp

For new user registration options, I do have "Require Date of Birth and Minimum Age: 13" set. And I'm using "Use reCAPTCHA".

Any thoughts on what might be causing this? I checked all the unique timezone settings for my users against DateTimeZone using a simple:

Code:
foreach ($timezones as $tz) {
    try {
        $mars = new DateTimeZone($tz);
    } catch(Exception $e) {
        echo $e->getMessage(). "\n";
    }
}

script and check and none of them were invalid. Also, no users have an empty time zone field in the database. And it doesn't appear to be preventing new users from registering.

I'm running Xenforo 1.5.

I'm completely error free otherwise. Kind of want to be at 100% error message free now. :)

Any advice welcome! Thanks!
 
This is a bug in NewRelic -- we catch this as an exception and ignore it so it shouldn't be reported. We don't allow invalid time zones to be saved (this check is preSave).

Specifically, this is likely caused by a robot filling out the form incorrectly.
 
Top Bottom