Commit 90c69076 authored by David Kindl's avatar David Kindl Committed by Damien McKenna
Browse files

Issue #3253233 by Mulambo, DamienMcKenna, Liam Morland, poker10: Deprecated...

Issue #3253233 by Mulambo, DamienMcKenna, Liam Morland, poker10: Deprecated function: changing return type (ReturnTypeWillChange).
parent 3150217b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -4,7 +4,9 @@ Date 7.x-2.x-dev, xxxx-xx-xx
  conversion.
#3241762 by DamienMcKenna: Remove date value caching.
#2779769 by DamienMcKenna, CoderBrandon: Time zone handling for Site's time zone
  settings incorrectly sets tz to user's
  settings incorrectly sets tz to user's.
#3253233 by Mulambo, DamienMcKenna, Liam Morland, poker10: Deprecated function:
  changing return type (ReturnTypeWillChange).


Date 7.x-2.12, 2021-10-07
+3 −0
Original line number Diff line number Diff line
@@ -190,6 +190,7 @@ class DateObject extends DateTime {
  /**
   * Re-builds the object using local variables.
   */
  #[\ReturnTypeWillChange]
  public function __wakeup() {
    $this->__construct($this->serializedTime, new DateTimeZone($this->serializedTimezone));
  }
@@ -367,6 +368,7 @@ class DateObject extends DateTime {
   * @param bool $force
   *   Whether or not to skip a date with no time. Defaults to FALSE.
   */
  #[\ReturnTypeWillChange]
  public function setTimezone($tz, $force = FALSE) {
    // PHP 5.2.6 has a fatal error when setting a date's timezone to itself.
    // http://bugs.php.net/bug.php?id=45038
@@ -404,6 +406,7 @@ class DateObject extends DateTime {
   * @return string|bool
   *   Returns the formatted date string on success or FALSE on failure.
   */
  #[\ReturnTypeWillChange]
  public function format($format, $force = FALSE) {
    return parent::format($force ? $format : date_limit_format($format, $this->granularity));
  }