Project

General

Profile

Actions

Regression #14365

closed

PHP error in RSS widget after saving settings

Added by Jim Pingle over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Dashboard
Target version:
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 #1

Updated by Jim Pingle over 1 year ago

  • Assignee set to Jim Pingle
Actions #2

Updated by Jim Pingle over 1 year ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #3

Updated by Jim Pingle over 1 year ago

  • Plus Target Version changed from 23.09 to 23.05

Picked back to 23.05

Actions #4

Updated by Jim Pingle over 1 year ago

  • Status changed from Feedback to Resolved

Working well on the current RC snapshot. No PHP errors after saving the widget settings.

Actions #5

Updated by Jim Pingle over 1 year ago

  • Affected Version set to 2.7.0
Actions

Also available in: Atom PDF