-
Notifications
You must be signed in to change notification settings - Fork 88
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
serendipity_event_multilingual: not compatible with PHP 8 #801
Comments
Maybe something for @stephanbrunker ? |
It's part of additional_plugins repo. I included your code fix on the new fix/801-serendipity_event_multilingual branch. I think there are other things broken somewhere. Unfortunately I can't investigate much time on S9Y at the moment. But this branch can be used by whoever wants to fix this issue. |
I have a running serendipity_event_multilingual on my blog, under PHP8 with no problems. There is just the issue that I am effectively running my own fork of s9y now with the additional features depending on a little cleaned up core and merge the new main s9y commits into it. So, I am not 100% sure at what point it diverged and depended on the altered core functions. But if I did everything correctly in order, the commit stephanbrunker/additional_plugins@f4f5a95 should bring a major improvement to the multilingual plugin without it depending on the altered functions of my fork and stephanbrunker/additional_plugins@ee4812a is an additional PHP8 bugfix. If I remember correctly, the "language determination in the core" commits from the multilingual changelog are in the main s9y build now and only the major multitlingual commit was held back because it depended on these 2.4 changes. So, feel free to pull these two commits from my repo. I also started to perfect the multilingual functionality by moving the plugin to the major s9y and adding multilingual mail support - e.g. that the language of someone making a subscription is stored and the notification mail is then sent to him in his language. But never completed this one because of obvious reasons because that needed major changes in the core mail functions. And now I am going back to amusing myself with an Joomla page, where all the additional components don't work if I upgrade from 3.10 to 4.0 and support of 3.10 is terminated in August 2023. |
Thank you Stephan, I applied your two patches and the plugin works again :) Something else I noted: This did not work with version 2.4.0 anymore and I had to change them to |
Where do those two commits live exactly? https://github.com/stephanbrunker/Serendipity ? |
|
I cherry-picked the two commits into the branch and made a pull request. As I said I can't test it here, but if it's fine, we can merge. |
user_language was broken in #650 (I think). We can not switch the plugin now to just use serendipity[user_language], as that would break all versions before 2.4. We will have to add a version switch to the sidebar plugin. I added a comment to the PR. |
After I was forced to switch to PHP 8 by my hosting provider, I upgraded Serendipity to 2.4.0. This worked fine except for the plugin serendipity_event_multilingual.
serendipity_event_multilingual uses the PHP keyword
each
atserendipity_event_multilingual.php:280
, which was removed from PHP 8.I tried to replace
while(list($key,) = each($properties))
with
foreach ($properties as $key => $property)
but I wasn't lucky. My PHP skills are basic. My blog loads without PHP errors, but switching the language doesn't work anymore...
The text was updated successfully, but these errors were encountered: