Uninitialized string offset: 0 in FilterMailchimpCampaign->convertUrl()

Created on 5 October 2021, almost 4 years ago
Updated 10 July 2025, 16 days ago

Problem/Motivation

When trying to preview a new campaign containing href with empty src (""), the following error occurs :

Uninitialized string offset: 0 in Drupal\mailchimp_campaign\Plugin\Filter\FilterMailchimpCampaign->convertUrl()

Obviously empty src shouldn't occur, but in case, it has to be handled.

Steps to reproduce

  • Enable mailchimp & mailchimp_campaign modules
    • Create a campaign with a href having an empty src
    • Preview it
    • Proposed resolution

      See attached patch (3240840-1.patch).

      🐛 Bug report
      Status

      Closed: won't fix

      Version

      2.0

      Component

      Campaign Module

      Created by

      🇫🇷France NicociN

      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.

      • 🇺🇸United States xenophyle

        Thanks for submitting this ticket — and sorry we didn’t get back to you about it sooner. We are cleaning up old issues and issue for old versions and are going to close this one. If this issue is still relevant for you, please re-open it and update the “Version” field, and include any updates to the behavior you are seeing.With a smaller issue queue, we’ll have an easier time getting back to you.

      Production build 0.71.5 2024