From bb0fcc3a307adae8f813cb8ec3040108a69caab5 Mon Sep 17 00:00:00 2001 From: Rob Lensen Date: Wed, 21 Mar 2018 23:26:27 +0100 Subject: [PATCH] php72 fixes, replaces each() function --- include/feedcreator.class.php | 14 +++++++------- install.php | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/feedcreator.class.php b/include/feedcreator.class.php index d3cbaeb7f..6b89ae22e 100644 --- a/include/feedcreator.class.php +++ b/include/feedcreator.class.php @@ -40,11 +40,11 @@ v1.7 07-18-04 added a switch to select an external stylesheet (thanks to Pascal Van Hecke) changed default content-type to application/xml added character encoding setting - fixed numerous smaller bugs (thanks to Sören Fuhrmann of golem.de) - improved changing ATOM versions handling (thanks to August Trometer) - improved the UniversalFeedCreator's useCached method (thanks to Sören Fuhrmann of golem.de) - added charset output in HTTP headers (thanks to Sören Fuhrmann of golem.de) - added Slashdot namespace to RSS 1.0 (thanks to Sören Fuhrmann of golem.de) + fixed numerous smaller bugs (thanks to Sören Fuhrmann of golem.de) + improved changing ATOM versions handling (thanks to August Trometer) + improved the UniversalFeedCreator's useCached method (thanks to S?en Fuhrmann of golem.de) + added charset output in HTTP headers (thanks to S?en Fuhrmann of golem.de) + added Slashdot namespace to RSS 1.0 (thanks to S?en Fuhrmann of golem.de) v1.6 05-10-04 added stylesheet to RSS 1.0 feeds @@ -62,7 +62,7 @@ v1.6 beta 02-28-04 considered beta due to some internal changes v1.5.1 01-27-04 - fixed some RSS 1.0 glitches (thanks to Stéphane Vanpoperynghe) + fixed some RSS 1.0 glitches (thanks to St?hane Vanpoperynghe) fixed some inconsistencies between documentation and code (thanks to Timothy Martin) v1.5 01-06-04 @@ -1170,7 +1170,7 @@ class MBOXCreator extends FeedCreator { $eol = "\r\n"; $escape = "="; $output = ""; - while( list(, $line) = each($lines) ) { + foreach($lines as $itt => $line){ //$line = rtrim($line); // remove trailing white space -> no =20\r\n necessary $linlen = strlen($line); $newline = ""; diff --git a/install.php b/install.php index b6d535c68..88405608c 100644 --- a/install.php +++ b/install.php @@ -33,11 +33,11 @@ if( !@get_magic_quotes_gpc() ) { if( is_array($_POST) ) { - while( list($k, $v) = each($_POST) ) + foreach($_POST as $k => $v) { if( is_array($_POST[$k]) ) { - while( list($k2, $v2) = each($_POST[$k]) ) + foreach($_POST[$k] as $k2 => $v2) { $_POST[$k][$k2] = addslashes($v2); } @@ -53,11 +53,11 @@ if( !@get_magic_quotes_gpc() ) if( is_array($_GET) ) { - while( list($k, $v) = each($_GET) ) + foreach($_GET as $k => $v ) { if( is_array($_GET[$k]) ) { - while( list($k2, $v2) = each($_GET[$k]) ) + foreach($_GET[$k] as $k2 => $v2) { $_GET[$k][$k2] = addslashes($v2); } @@ -73,11 +73,11 @@ if( !@get_magic_quotes_gpc() ) if( is_array($_COOKIE) ) { - while( list($k, $v) = each($_COOKIE) ) + foreach($_COOKIE as $k => $v) { if( is_array($_COOKIE[$k]) ) { - while( list($k2, $v2) = each($_COOKIE[$k]) ) + foreach($_COOKIE[$k] as $k2 => $v2) { $_COOKIE[$k][$k2] = addslashes($v2); }