Skip to content

SimplePie fix PHP8 uncatched error#3547

Merged
Alkarex merged 1 commit intoFreshRSS:edgefrom
Alkarex:SimplePie-Throwable-loadHTML
Mar 23, 2021
Merged

SimplePie fix PHP8 uncatched error#3547
Alkarex merged 1 commit intoFreshRSS:edgefrom
Alkarex:SimplePie-Throwable-loadHTML

Conversation

@Alkarex
Copy link
Member

@Alkarex Alkarex commented Mar 20, 2021

#fix #3537
When loadHTML() is given a null or empty string.

PHP Fatal error:  Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /var/www/freshrss/lib/SimplePie/SimplePie/Locator.php:83

#fix FreshRSS#3546
When `loadHTML()` is given a null or empty string.

```
PHP Fatal error:  Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /var/www/freshrss/lib/SimplePie/SimplePie/Locator.php:83
```
@Alkarex Alkarex added this to the 1.19.0 milestone Mar 20, 2021
@Alkarex Alkarex linked an issue Mar 20, 2021 that may be closed by this pull request
Alkarex added a commit to FreshRSS/simplepie that referenced this pull request Mar 20, 2021
Fix
```
PHP Fatal error:  Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /SimplePie/Locator.php:83
```

`set_error_handler` does not catch ValueError in PHP8
The code is compatible PHP5 and PHP7.

Fix downstream bug FreshRSS/FreshRSS#3537
Downstream PR FreshRSS/FreshRSS#3547
@Alkarex
Copy link
Member Author

Alkarex commented Mar 20, 2021

Patch submitted upstream simplepie/simplepie#673

mblaney pushed a commit to simplepie/simplepie that referenced this pull request Mar 23, 2021
Fix
```
PHP Fatal error:  Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /SimplePie/Locator.php:83
```

`set_error_handler` does not catch ValueError in PHP8
The code is compatible PHP5 and PHP7.

Fix downstream bug FreshRSS/FreshRSS#3537
Downstream PR FreshRSS/FreshRSS#3547
@Alkarex Alkarex merged commit 0ff6ba4 into FreshRSS:edge Mar 23, 2021
@Alkarex Alkarex deleted the SimplePie-Throwable-loadHTML branch March 23, 2021 09:54
@Alkarex
Copy link
Member Author

Alkarex commented Mar 23, 2021

Accepted and merged upstream

@Alkarex Alkarex modified the milestones: 1.19.0, 1.18.1 Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] actualize_script.php fails if the feed is empty when run by php8

1 participant