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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

evgeny.chernyavskiy created an issue. See original summary.

evgeny.chernyavskiy’s picture

evgeny.chernyavskiy’s picture

Status: Active » Needs review
DamienMcKenna’s picture

Assigned: evgeny.chernyavskiy » Unassigned

Oh nice! Thanks!

steinmb’s picture

Status: Needs review » Reviewed & tested by the community

Safe one liner.

DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed
Parent issue: » #2867810: Plan for Date 7.x-2.11 release

I 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!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jweowu’s picture

As 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.

chanh’s picture

I 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

DamienMcKenna’s picture

@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.

colinstillwell’s picture

During 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!

evgeny.chernyavskiy’s picture

@colinstillwell, my understanding of the comment

// If this is not a date field, nothing more to do.

is that the remainder of the foreach is to be ignored, hence continue 2;.

Sseto’s picture

Is this ever going to get comitted to prod? Or do I need to install the dev version?

Thanks!

jweowu’s picture

Sseto’s picture

Ah that's good news then! Thanks :)