[BUGFIX] Replace PHP 7.2 deprecated each()