HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[3.3] PHP Warning: dateTimeToTimeStampcalled with bad input in DateTimeFormatter.php line 228

Upgraded from version 3.1 to 3.3:

$ awk -F \' '/APPLICATION_VERSION/ {print $4}' vanilla/environment.php

As far as I can tell everything seems fine but the Apache error log is being spammed with:

AH01071: Got error 'PHP message: PHP Warning:  dateTimeToTimeStampcalled with bad input  in vanilla/library/Vanilla/Formatting/DateTimeFormatter.php on line 228

Running PHP 7.4.0 and Apache 2.4.41 on Arch Linux.

Ran utility/update with no issue.

Using default theme.

md5sum verifies DateTimeFormatter.php is the same as included in vanilla-core-3-3.zip .

How should I debug this?



  • Options
    R_JR_J Ex-Fanboy Munich Admin

    It's only a warning. You don't need to do anything about that.

  • Options
    charrondevcharrondev Developer Lead (PHP, JS) Montreal Vanilla Staff
    edited December 2019

    Exactly write. They don't represent a critical issue. I would have opted for a notice, but they don't get logged in Vanilla.

    We started logging to track down instances that were causing it in our production instances. Oftentimes it's caused by certain date fields in the DB existing without a valid value.

    We're currently working on more detailed logging for instances like these so that they can be more easily tracked down. Oftentimes in my experience it has been due to some imported data that was not fully "cleaned up".

  • Options

    Thanks, I realize it is just a warning, but it is annoying to get 3.7K worth of log spam for just this warning per page load. Perhaps I will disable warnings for this particular vhost.

  • Options

    +1 on Linux / Apache 2.4 PHP 7.3 MySQL 5.7

    Oftentimes in my experience it has been due to some imported data that was not fully "cleaned up".

    Please @charrondev could you tell us more ;) about this needed cleaning? Many thanks in advance

    PS: Made a database export / import when upgraded from 2.8 (to 3.3) recently... using phpMyAdmin 4.9

  • Options

    Back to 2.6.4 without this issues but once upgraded to 2.8.4 (and later to 3.3) there is this warning for now...

    Any idea ;) in order to fix it ?

    PS: Keystone theme

  • Options

    Sorry ;) in fact all seem right until 3.2

Sign In or Register to comment.