#37227 closed defect (bug) (fixed)
PHP 7 compatibilty issues in twentythirteen and twentyfourteen
Reported by: | xknown | Owned by: | karmatosed |
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | Cc: |
Description
While running the php7cc tool, it reported two incompatibilities for the above mentioned themes.
PHP 7 changes the behavior of the foreach loop. It doesn't longer modify the internal array pointer, thus using it with current/reset/etc doesn't produce the expected results.
You can see the different results for PHP 5.x vs PHP 7.x https://3v4l.org/oQiI9
The problematic lines are in the following methods
Attachments (2)
Change History (6)
#1
@
8 years ago
- Keywords has-patch added
You can see the output of the proposed patches in https://3v4l.org/2SPQf
cc @davidakennedy @karmatosed
#2
@
8 years ago
This would be good to do, and the patch is similar to changes made to dozens of themes on WordPress.com with no issues.
Note: See
TracTickets for help on using
tickets.
Patch for twentythirteen