PHP 8 Compatibility

Created on 2 September 2022, over 2 years ago
Updated 11 July 2023, over 1 year ago

Problem/Motivation

There are deprecated function calls on php 8:
Deprecated function: parse_str(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\video_embed_twentythree\Plugin\video_embed_field\Provider\TwentyThree->getToken() (line 305 of modules/contrib/video_embed_twentythree/src/Plugin/video_embed_field/Provider/TwentyThree.php).

Deprecated function: parse_str(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\video_embed_twentythree\Plugin\video_embed_field\Provider\TwentyThree->getEmbedQueryParameters() (line 280 of modules/contrib/video_embed_twentythree/src/Plugin/video_embed_field/Provider/TwentyThree.php).

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇭🇺Hungary szato

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to Fixed over 1 year ago
  • 🇩🇰Denmark beltofte Copenhagen 🇩🇰

    Thanks for working on the fix. parse_str() returns either an array or FALSE, and isset() will return TRUE even the variable in argument is FALSE. I have therefore change it from isset() to !empty(). Also implemented a minor change to the foreach loop filtering unwanted query parameters, as $query_parts may not be set.

  • Status changed to Fixed over 1 year ago
  • 🇩🇰Denmark beltofte Copenhagen 🇩🇰
Production build 0.71.5 2024