Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.

[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
3.3

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?

Tagged:
webservices

Comments

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

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


  • 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".

    Pamela
  • 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.

  • +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

  • 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

  • PamelaPamela ✭✭

    Sorry ;) in fact all seem right until 3.2

Sign In or Register to comment.