RSS聚合器源码:Lilina

2019年5月8日 | 分类: 【技术】

【介绍】

Lilina是Panayotis Vryonis(vrypan)主持的基于PHP的单用户版RSS聚合系统。满足个人采集信息,阅读信息的功能、UE等要求。

作者:http://vrypan.net/
官网:http://getlilina.org

【排错】

当系统升级到 PHP7.3 ,日志中出现多个报错。

报错:PHP Warning: Use of undefined constant LILINA_USERAGENT – assumed ‘LILINA_USERAGENT’ (this will throw an Error in a future version of PHP) in /portal/inc/core/Feeds.php on line 263

参考:https://theme-fusion.com/forums/topic/php-7-2-warning-request_uri-in-functions-php/

搜索:

		$sp->set_useragent(LILINA_USERAGENT . ' SimplePie/' . SIMPLEPIE_BUILD);

替换为:

		$sp->set_useragent('LILINA_USERAGENT' . ' SimplePie/' . SIMPLEPIE_BUILD);

报错:PHP Notice: unserialize(): Error at offset 267 of 309 bytes in /portal/inc/core/Options.php on line 44,

参考:https://davidwalsh.name/php-serialize-unserialize-issues
参考:https://board.phpbuilder.com/d/10358820-resolved-unserialize-problem-error-at-offset-0-of-4-bytes/8
参考:https://www.toolmao.com/php-unserialize-error-at-offset

搜索:

			self::$options = unserialize(self::$options);

替换为:

			$safe_string_to_store = base64_encode(serialize(self::$options));
			self::$options = unserialize(base64_decode($safe_string_to_store));