Actions
Regression #14365
closedPHP error in RSS widget after saving settings
Start date:
Due date:
% Done:
100%
Estimated time:
Plus Target Version:
23.05
Release Notes:
Default
Affected Version:
2.7.0
Affected Architecture:
Description
If you save settings for the RSS widget, the widget generates a PHP error.
This happens even with the default settings on a completely fresh installation: Add the RSS widget, click the wrench, click Save.
PHP error is:
PHP Errors: [09-May-2023 12:31:08 Etc/UTC] PHP Fatal error: Uncaught TypeError: array_slice(): Argument #3 ($length) must be of type ?int, string given in /usr/local/pfSense/include/vendor/simplepie/simplepie/src/SimplePie.php:3165 Stack trace: #0 /usr/local/pfSense/include/vendor/simplepie/simplepie/src/SimplePie.php(3165): array_slice(Array, 0, '10') #1 /usr/local/pfSense/include/vendor/simplepie/simplepie/src/SimplePie.php(2997): SimplePie\SimplePie::merge_items(Array, 0, '10', 0) #2 /usr/local/www/widgets/widgets/rss.widget.php(109): SimplePie\SimplePie->get_items(0, '10') #3 /usr/local/www/index.php(430): include('/usr/local/www/...') #4 {main} thrown in /usr/local/pfSense/include/vendor/simplepie/simplepie/src/SimplePie.php on line 3165
config.xml contains:
<widgets>
<sequence>system_information:col1:open:0,disks:col1:open:0,netgate_services_and_support:col2:open:0,interfaces:col2:open:0,rss:col2:open:0</sequence>
<period>10</period>
<rss-0>
<descr><![CDATA[RSS]]></descr>
<rssfeed>https://www.netgate.com/blog/</rssfeed>
<rssmaxitems>10</rssmaxitems>
<rsswidgetheight>300</rsswidgetheight>
<rsswidgettextlength>140</rsswidgettextlength>
</rss-0>
</widgets>
Actions