aurovrata / cf7-grid-layout

A WordPress plugin extension for Contact Form 7 to design responsive grid-layout forms.
https://wordpress.org/plugins/cf7-grid-layout/
GNU General Public License v2.0
6 stars 7 forks source link

continue 2 / break - php version #10

Closed Ark74 closed 5 years ago

Ark74 commented 5 years ago

With the deprecation of PHP 5.6 and 7.0, I've moved to a more recent php version and I'm looking at recurrent warnings.

My guess is that is related to the newer php version, seems to be the only warnings related to the continue function.

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ~/cf7-grid-layout/public/class-cf7-grid-layout-public.php on line 1098

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ~/cf7-grid-layout/public/class-cf7-grid-layout-public.php on line 1496

Are there plans to upgrade the php support for newer releases? Thanks in advance for the attention. Cheers!

aurovrata commented 5 years ago

Hello Luis

My guess is that is related to the newer php version

no, this warning comes in all versions. It is due to a line that forces a break from a switch statement by contiunue-ing the outer for loop. Its quite normal and intentional.

Fyi, the plugin is developed using php 7.3, although currently there are no php 7+ specific structures that used and therefore the plugin code is compatible with 5.6 as well.

Ark74 commented 5 years ago

All right then. Thanks.