Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated gmstrftime PHP function #12

Commits on May 30, 2023

  1. Replace deprecated gmstrftime PHP function

    gmstrftime - Warning: This function has been DEPRECATED as of PHP 8.1.0. Relying on this function is highly discouraged.
    
    Adding a new static function to Utils.php to generate the the required Compact Date strings to send to the device.
    liverpoolfc-fan committed May 30, 2023
    Configuration menu
    Copy the full SHA
    8766795 View commit details
    Browse the repository at this point in the history
  2. Return empty string instead of setting it to null (#1)

    PHP 8.0 stopped allowing empty strings to be passed to gmstrftime. This led to the previously suggested change to replace the empty string with null. Unfortunately, that change collided with the gmstrftime also accepting null as a valid input where it would return the current time formatted as requested.
    
    This led to contacts who had empty Anniversary and Birthday fields getting their empty strings replaced by nulls, and subsequently getting passed to gmstrftime which would assign them values of the current time.
    
    The correct behaviour for the streamer in this instance is to just return the empty string
    liverpoolfc-fan committed May 30, 2023
    Configuration menu
    Copy the full SHA
    bcdb0c8 View commit details
    Browse the repository at this point in the history