PHP Error encountered

Hi Guys, Im getting the following php error message [code in line 81 is (is_array($module)) ? list($module, $params) = each($module) : $params = NULL;] and have no clue how to resolve it. I only tried to change $db parameter from mysql to mysqli and still doesnt work:

A PHP Error was encountered

Severity: 8192

Message: The each() function is deprecated. This message will be suppressed on further calls

Filename: MX/Modules.php

Line Number: 81


File: /home/rzrsqgpy/public_html/invoice/application/third_party/MX/Modules.php
Line: 81
Function: each

File: /home/rzrsqgpy/public_html/invoice/application/third_party/MX/Loader.php
Line: 269
Function: load

File: /home/rzrsqgpy/public_html/invoice/application/core/Base_Controller.php
Line: 72
Function: module

File: /home/rzrsqgpy/public_html/invoice/application/core/User_Controller.php
Line: 25
Function: __construct

File: /home/rzrsqgpy/public_html/invoice/application/core/Admin_Controller.php
Line: 20
Function: __construct

File: /home/rzrsqgpy/public_html/invoice/application/modules/products/controllers/Products.php
Line: 23
Function: __construct

File: /home/rzrsqgpy/public_html/invoice/index.php
Line: 327
Function: require_once

Please search the forum before posting: PHP 7.2 upgrade

Either upgrade the app or use 7.1