Closed (fixed)
Project:
Scheduler
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Jan 2023 at 15:21 UTC
Updated:
15 Feb 2023 at 12:59 UTC
Jump to comment: Most recent
With PHP 8 the first parameter of strncasecmp() can no longer be NULL.
Deprecated function: strncasecmp(): Passing null to parameter #1 ($string1) of type string is deprecated in _scheduler_strptime()[...] will occur.When initialising $results, set 'meridiem' either to an empty string or 'am', or potentially move the two morning/afternoon check into a conditional block that checks $results['meridiem'] !== NULL
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jonathan1055 commentedHi magicmyth,
Thanks for reporting this and for making the MR. I've not used the 7.x-1.x branch with PHP8 so these things have gone unnoticed.
Comment #4
jonathan1055 commentedI have now added a branch test for 7.x using php8.1
Comment #5
jonathan1055 commentedThat's good - the new branch test fails with
but this is the only failure when running on php8.1
Comment #7
jonathan1055 commentedThanks again for raising this. It's prompted me to add a branch test for php8.1 and this is now the issue testing default too.
Comment #8
jonathan1055 commentedComment #9
magicmyth commentedThanks for looking into this so fast! Great to have the test in place now. With PHP 7.4 EOL I'll be moving a bunch of sites over to 8.1 soon so that will really help for keeping an eye on things.
Comment #10
jonathan1055 commentedYou're welcome, and thank you for reporting it. It was an oversight that Scheduler 7.x was not being tested at PHP8. I'm pleased that this was the only test failure, as we can see on https://www.drupal.org/pift-ci-job/2579521 which I ran before this commit. Of course, there could be other things which are not compatible with PHP8 and are not covered in the tests. If you find anything, please report it.
Would it help if I released Scheduler 7.x-1.7? It's been more than two years since 7.x-1.6 but there are only a few things that have been committed, see #3171040: Features and Fixes for Scheduler 7.x-1.7 release. But it's probably good to have a new release now that this php8 fix is done.