Skip to content

Conversation

MarkCay
Copy link

@MarkCay MarkCay commented Sep 6, 2025

Before PHP 8.2.0, DateTime::getLastErrors() did not return false when there were no warnings or errors. Instead, it would always return the documented array structure. (https://www.php.net/manual/en/datetimeimmutable.getlasterrors.php#refsect1-datetimeimmutable.getlasterrors-changelog)

This patch ensures that the array_sum() will not receive a false as a parameter.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests and did you add any new tests needed for your feature?
  2. Did you update all templates (if applicable)?
  3. Did you add the relevant documentation (if applicable)?
  4. Did you test locally to make sure your feature works as intended?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@MarkCay MarkCay changed the title Patch v1.25.1 v1.25.2: Fixed DateTime::getLastErrors() returning false on PHP 8.2+ Sep 6, 2025
@MarkCay MarkCay marked this pull request as ready for review September 6, 2025 01:01
@MarkCay
Copy link
Author

MarkCay commented Sep 12, 2025

Hi @rappasoft @lrljoe, just to clarify — do I need to complete all 9 tasks before this PR can be reviewed? I left the last four unchecked since my changes aren’t related to New Feature Submissions. Thanks! ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants