Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
This is to fix one obvious PHP 7.3 compatibility issue with the module:
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? date_views_fields.inc:86
Comment | File | Size | Author |
---|---|---|---|
#2 | 3009740-1-php-7.3-compatibility.patch | 530 bytes | evgeny.chernyavskiy |
|
Comments
Comment #2
evgeny.chernyavskiy CreditAttribution: evgeny.chernyavskiy as a volunteer commentedComment #3
evgeny.chernyavskiy CreditAttribution: evgeny.chernyavskiy as a volunteer commentedComment #4
DamienMcKennaOh nice! Thanks!
Comment #5
steinmb CreditAttribution: steinmb as a volunteer commentedSafe one liner.
Comment #7
DamienMcKennaI took a look through the codebase and couldn't find any other 'switch' statements that included a 'continue' statement that directly affected it. Committed. Thanks!
Comment #9
jweowu CreditAttribution: jweowu at Catalyst IT commentedAs a foot-note, AFAICS this wasn't a "PHP 7.3 compatibility" issue? It was the same bug in PHP 5 (and doubtless much earlier too) as it was in PHP 7.3. The latter just actively detects and warns about the problem.
Comment #10
chanh CreditAttribution: chanh as a volunteer commentedI just upgraded my site to Drupal core 7.64 but still getting this error below with PHP 7.3.1
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in require_once() (line 341 of /home/vd/public_html/drupal7/includes/module.inc).
Deprecated function: Function create_function() is deprecated in chain_menu_access_chain() (line 59 of /home/vd/public_html/drupal7/modules/chain_menu_access/chain_menu_access.module).
Thanks
Comment #11
DamienMcKenna@chanh: Did you update your Date module to either a dev snapshot or 7.x-2.11-beta2? If you're still using 7.x-2.10 then you don't have the fix. Thanks.
Comment #12
colinstillwell CreditAttribution: colinstillwell commentedDuring our analysis for the PHP 7.3 compatibility warning fixes, we have been replacing anything with "continue" to "break" so that it preserves existing behaviour, without outputting warnings.
The patch in this issue actually changes the behaviour and fixes an existing issue, so we should be careful not to get confused with this.
Having had a look at the change, we should never fall into this and we are happy with the fix.
I just wanted to share our findings for the community!
Comment #13
evgeny.chernyavskiy CreditAttribution: evgeny.chernyavskiy as a volunteer commented@colinstillwell, my understanding of the comment
is that the remainder of the
foreach
is to be ignored, hencecontinue 2;
.Comment #14
Sseto CreditAttribution: Sseto commentedIs this ever going to get comitted to prod? Or do I need to install the dev version?
Thanks!
Comment #15
jweowu CreditAttribution: jweowu at Catalyst IT commentedSseto: Same answer as before?
https://www.drupal.org/project/date/issues/2867810#comment-13809549
Comment #16
Sseto CreditAttribution: Sseto commentedAh that's good news then! Thanks :)