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

PHP 8.1: issue with boolean values (unread, starred) #1330

Closed
flozz opened this issue Apr 8, 2022 · 4 comments
Closed

PHP 8.1: issue with boolean values (unread, starred) #1330

flozz opened this issue Apr 8, 2022 · 4 comments
Labels
Milestone

Comments

@flozz
Copy link

flozz commented Apr 8, 2022

Hello,

I have an issue when running Selfoss with PHP 8.1: all articles are displayed as read (but are not) and the counter on the left menu has the right count of unread articles. This issue is reproductible only with PHP 8.1, everything works as intended with PHP 8.0.


Here is the item in the database:

image

Here is what the browser receive with PHP 8.1:

image

And here is what the browser receive when running Selfoss with PHP 8.0:

image


I found the following breaking change in the PHP doc that may explain the issue:

PDO::ATTR_STRINGIFY_FETCHES now stringifies values of type bool to "0" or "1". Previously bools were not stringified.

https://www.php.net/manual/en/migration81.incompatible.php

I cannot dig more myself but I hope this will help :)

@jtojnar jtojnar added the bug label Apr 8, 2022
@jtojnar
Copy link
Member

jtojnar commented Apr 8, 2022

Could you please clarify which database backend this is?

@flozz
Copy link
Author

flozz commented Apr 8, 2022

I tried with both sqlite and mysql

EDIT: I had this error with sqlite (I just remembered I had an other issue with mysql (10.5.15-MariaDB) so I get back to sqlite)

@jtojnar jtojnar closed this as completed in 2ede756 Apr 8, 2022
@jtojnar
Copy link
Member

jtojnar commented Apr 8, 2022

Actually, looks like it happens in both MySQL and SQLite, only PostgreSQL is not affected. Thanks for reporting, should be fixed now.

@jtojnar jtojnar added this to the 2.19 milestone Apr 8, 2022
@flozz
Copy link
Author

flozz commented Apr 8, 2022

Yes, I confirm, it works perfectly now. Thank you very much! :D

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

No branches or pull requests

2 participants