Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to undefined function Piwik\Plugins\RssWidget\simplexml_load_string() #19217

Closed
paladox opened this issue May 14, 2022 · 1 comment
Closed
Labels
answered For when a question was asked and we referred to forum or answered it. worksforme The issue cannot be reproduced and things work as intended.

Comments

@paladox
Copy link
Contributor

paladox commented May 14, 2022

I saw the follow:

The following error just broke Matomo (v4.9.1):

Call to undefined function Piwik\Plugins\RssWidget\simplexml_load_string()
in /srv/matomo/plugins/RssWidget/RssRenderer.php line 62      

when visiting /index.php?date=yesterday&module=RssWidget&action=rssPiwik&disableLink=0&widget=1&idSite=8590&period=day

Expected Behavior

Going to /index.php?date=yesterday&module=RssWidget&action=rssPiwik&disableLink=0&widget=1&idSite=8590&period=day is not expected to throw an error.

Current Behavior

An error is thrown when going to /index.php?date=yesterday&module=RssWidget&action=rssPiwik&disableLink=0&widget=1&idSite=8590&period=day.

Possible Solution

Maybe it should be like:

                $rss = @\simplexml_load_string($content);
                if ($rss === false) {
                    throw new \Exception("Failed to parse XML.");
                }

?

Steps to Reproduce (for Bugs)

  1. Go to /index.php?date=yesterday&module=RssWidget&action=rssPiwik&disableLink=0&widget=1&idSite=8590&period=day

Context

Your Environment

  • Matomo Version: 4.9.1
  • PHP Version: 7.4.28
  • Server Operating System: debian 11
  • Additionally installed plugins:
  • Browser: Safari (v15.4 (17613.1.17.1.13))
  • Operating System: Mac OS 12.3.1
@paladox paladox added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label May 14, 2022
@paladox
Copy link
Contributor Author

paladox commented May 14, 2022

nvm, needs the php-xml extension to be installed.

@paladox paladox closed this as completed May 14, 2022
@sgiehl sgiehl added worksforme The issue cannot be reproduced and things work as intended. answered For when a question was asked and we referred to forum or answered it. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants