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

Boolean passed to trim() throws fatal error in PHP8.2 and Simplepie 1.8 #852

Open
git-marijus opened this issue Nov 1, 2023 · 4 comments

Comments

@git-marijus
Copy link

This happens regularily when parsing certain feeds. Here is the trace:

PHP Fatal error:  Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, bool given in /vendor/simplepie/simplepie/src/Sanitize.php:319
Stack trace:
#0 /vendor/simplepie/simplepie/src/Sanitize.php(319): trim()
#1 /vendor/simplepie/simplepie/src/Sanitize.php(338): SimplePie\Sanitize->is_https_domain()
#2 /vendor/simplepie/simplepie/src/Sanitize.php(510): SimplePie\Sanitize->https_url()
#3 /vendor/simplepie/simplepie/src/Sanitize.php(413): SimplePie\Sanitize->replace_urls()
#4 /vendor/simplepie/simplepie/src/SimplePie.php(2307): SimplePie\Sanitize->sanitize()
#5 /vendor/simplepie/simplepie/src/Item.php(186): SimplePie\SimplePie->sanitize()
#6 /vendor/simplepie/simplepie/src/Item.php(352): SimplePie\Item->sanitize()
@git-marijus git-marijus changed the title Null passed to trim() throws fatal error in PHP8.2 Boolean passed to trim() throws fatal error in PHP8.2 Nov 1, 2023
@git-marijus git-marijus changed the title Boolean passed to trim() throws fatal error in PHP8.2 Boolean passed to trim() throws fatal error in PHP8.2 and Simplepie 1.8 Nov 1, 2023
@grimmdude
Copy link

I'm seeing this issue too, but it appears to have been fixed in 58865af

Will this be included in a release soon? Thanks

@jtojnar
Copy link
Contributor

jtojnar commented Nov 12, 2023

It should also have been fixed by #842 one-dot-eight branch. We could release 1.8.1 but we would need to check if there are some other regressions and then write release notes.

@thE-iNviNciblE
Copy link

it is fixed, the bug is gone.

Could someone release 1.9.0 or 1.8.1 since PHP 8.3 has now been released?

Everything works fine with PHP 8.3 and my round about 600+ feeds :-)

@karptonite
Copy link

We are also seeing this error, and as it is now fixed, it would be great if there could be a point release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants