each() is deprecated since PHP 7.2

Created on 15 May 2019, over 5 years ago
Updated 6 September 2024, 4 months ago

Getting following error on PHPCS run for php 7.2
$ phpcs --standard=PHPCompatibility --extensions=php,module,inc,install,test,profile,theme --runtime-set testVersion 7.2 sites/default/modules/contrib/

FILE: sites\default\modules\contrib\quiz\quiz.admin.inc
--------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
1745 | WARNING | Function each() is deprecated since PHP 7.2; Use a foreach loop instead
--------------------------------------------------------------------------------------------

FILE: sites\default\modules\contrib\quiz\quiz.pages.inc
--------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------
319 | WARNING | Function each() is deprecated since PHP 7.2; Use a foreach loop instead
392 | WARNING | Function each() is deprecated since PHP 7.2; Use a foreach loop instead
--------------------------------------------------------------------------------------------

🐛 Bug report
Status

Closed: duplicate

Version

4.0

Component

Code - Quiz core

Created by

🇮🇳India shital.mahajan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024