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

serendipity_event_textile: not compatible to php 8.1 #847

Open
bauigel opened this issue Jul 17, 2024 · 4 comments
Open

serendipity_event_textile: not compatible to php 8.1 #847

bauigel opened this issue Jul 17, 2024 · 4 comments
Labels

Comments

@bauigel
Copy link

bauigel commented Jul 17, 2024

I did an update to s9y latest git-master and now i get a lot of error-messages.

Notice: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in /plugins/serendipity_event_textile/lib3/src/Netcarver/Textile/Parser.php on line 2181.

Notice: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /plugins/serendipity_event_textile/serendipity_event_textile.php on line 164.

Notice: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /serendipity_event_textile/serendipity_event_textile.php on line 180.

The fix is easy for php 8.1 but I'm not sure if there is something to add to be downwards compatible. Maybe there is an update for textile to?

@onli onli added the bugs label Jul 18, 2024
@onli
Copy link
Member

onli commented Jul 18, 2024

Yes, https://github.com/textile/php-textile should be the new upstream for the textile plugin, and that one had a very recent release.

@onli
Copy link
Member

onli commented Jan 19, 2025

I tried something here, I replaced the old parsers with the current version. The PR is #864, it would be great if you could test this as well. Easiest way is to delete the serendipity_event_textile directory and replace it with the content from the branch of #864.

Note that textile is a core plugin, so no fast spartacus updates this time.

@bauigel
Copy link
Author

bauigel commented Feb 9, 2025

With current master I get a warning

str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/virtual/bauigel/bernd.distler.ws/plugins/serendipity_event_textile/serendipity_event_textile.php on line 169

Fix would be to attach ?? '' to $eventData

$eventData[$element] = str_replace('"', '"', $eventData[$element] ?? '');

Rest seems to work good so far.

@onli
Copy link
Member

onli commented Feb 13, 2025

I pushed a slightly different fix to master, same idea. Works for you as well?

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