• Resolved Prachi Vashishtha

    (@prachi-vashishtha)


    I wanted to report that the plugin is not fully compatible with PHP 8.3. Upon running it in a PHP 8.3 environment, the following warning is generated:

    Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/csi/html/wp-includes/functions.php on line 7329

    Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/csi/html/wp-includes/functions.php on line 2189

    Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/csi/html/wp-includes/formatting.php on line 2819

    functions\attribute-control.php:

      33        // check if the src file has .svg extension

      34:       if ( strpos( $html, ‘.svg’ ) !== FALSE ) {

      35  

    functions\featured-image.php:

      20    // need to make this check on the moment that the thumbnail shows up in the meta box.

      21:   if ( strpos( get_the_post_thumbnail(), ‘.svg’ ) ) {

      22  

    functions\attachment.php:

      71        // get the path relative to /uploads/ - found no better way:

      72:       $relative_path = str_replace($upload_dir['basedir'], '', $svg_path);

      73        $filename = basename( $svg_path );

    functions\featured-image.php:

      110  

      111:          $thumb = str_replace( 'attachment-', $target_class . ' attachment-', $thumb );

      112  

    functions\thumbnail-display.php:

      24  

      25:           $content = str_replace(

      26                '<# } else if ( \'image\' === data.type && data.sizes && data.sizes.full ) { #>',

      33  

      34:           $content = str_replace(

      35                '<# } else if ( \'image\' === data.type && data.sizes ) { #>',

    This issue seems to be related to deprecated functionality or compatibility issues in theabove files. It would be great if the plugin developers could investigate and update the codebase to ensure compatibility with PHP 8.3.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Benbodhi

    (@benbodhi)

    Hi there. Thanks for flagging. I believe this has been addressed in the latest version that’s in testing now, soon to be released. I’ll double check though.

    You’re welcome to try it too, it’s here: https://github.com/benbodhi/svg-support

    Plugin Author Benbodhi

    (@benbodhi)

    apologies, I think I may have missed this in the recent update. I only just realised after I pushed the update.

    I’ll aim to get this sorted and push another update asap.

    Plugin Author Benbodhi

    (@benbodhi)

    These deprecation notices have been addressed in v2.5.13
    But let me know if you still see issues after updating.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Plugin Compatibility Issue with PHP 8.3’ is closed to new replies.