Project

General

Profile

« Previous | Next » 

Revision e2b0f1f8

Added by Marcos M about 1 year ago

Move to foreach()

The function each() is deprecated since PHP 7.2.

View differences:

src/etc/inc/upgrade_config.inc
384 384
	global $config;
385 385
	if (is_array($config['ipsec']['tunnel'])) {
386 386
		reset($config['ipsec']['tunnel']);
387
		while (list($index, $tunnel) = each($config['ipsec']['tunnel'])) {
387
		foreach ($config['ipsec']['tunnel'] as $idnex => $tunnel) {
388 388
			/* Sanity check on required variables */
389 389
			/* This fixes bogus <tunnel> entries - remnant of bug #393 */
390 390
			if (!isset($tunnel['local-subnet']) && !isset($tunnel['remote-subnet'])) {

Also available in: Unified diff