From 778834a81b2e64514aaf2d6b8b5936b3bfef975f Mon Sep 17 00:00:00 2001 From: Owen Rudge Date: Mon, 26 Sep 2016 14:17:37 +0100 Subject: [PATCH] Use PHP 5-style constructors instead of legacy constructors, to resolve PHP 7 deprecation warning --- rss_cache.inc | 2 +- rss_parse.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rss_cache.inc b/rss_cache.inc index b8d436c..e7ce3b5 100644 --- a/rss_cache.inc +++ b/rss_cache.inc @@ -21,7 +21,7 @@ class RSSCache { var $MAX_AGE = 3600; // when are files stale, default one hour var $ERROR = ""; // accumulate error messages - function RSSCache ($base='', $age='') { + function __construct ($base='', $age='') { if ( $base ) { $this->BASE_CACHE = $base; } diff --git a/rss_parse.inc b/rss_parse.inc index 0c7075a..e66a48f 100644 --- a/rss_parse.inc +++ b/rss_parse.inc @@ -104,7 +104,7 @@ class MagpieRSS { * source encoding. (caveat emptor) * */ - function MagpieRSS ($source, $output_encoding='ISO-8859-1', + function __construct ($source, $output_encoding='ISO-8859-1', $input_encoding=null, $detect_encoding=true) { #