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 compatibility check causes false result with 8.x #15

Closed
indigoxela opened this issue Apr 4, 2023 · 3 comments · Fixed by #16
Closed

PHP compatibility check causes false result with 8.x #15

indigoxela opened this issue Apr 4, 2023 · 3 comments · Fixed by #16

Comments

@indigoxela
Copy link
Member

indigoxela commented Apr 4, 2023

Here's the code: https://github.com/backdrop-contrib/views_json/blob/1.x-1.x/views_json.module#L525

So, with php 8.0 or 8.1 the major version is bigger than 5 AND the minor version is smaller than 3.

This leads to wrong version assumption with 8.x. (Probably also with 7.1 or 7.2)

This popped up in an otherwise unrelated issue in another module backdrop-contrib/resource_timeslots#23

Time to update this ancient code, which currently breaks the "Numeric strings" setting. 😏

@indigoxela
Copy link
Member Author

indigoxela commented Apr 4, 2023

I think, we can just drop these workarounds for php 5.2 and 5.4. Backdrop requires at least 5.6 - and that version properly handles json_encode().

@indigoxela
Copy link
Member Author

FTR: @olafgrabienski successfully tested this PR (confirmed in the chat).

@olafgrabienski
Copy link
Member

olafgrabienski commented Apr 4, 2023

FTR: @olafgrabienski successfully tested this PR (confirmed in the chat).

Yep, I've tested it repeating the steps of the related Resources Timeslots issue report, and the PR fixed the issue for me.

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

Successfully merging a pull request may close this issue.

2 participants