Problem apears on list of Mailchimp lists on php 7:

Fatal error: Cannot use Drupal\Component\Utility\String as String because 'String' is a special class name mailchimp/modules/mailchimp_lists/src/Controller/MailchimpListsController.php on line 14

Fix for that is changing "String" to "SafeMarkup".

Patch in attachment.

Comments

henk created an issue. See original summary.

Status: Needs review » Needs work

The last submitted patch, mailchimp_list_string-php7-bug.patch, failed testing.

The last submitted patch, mailchimp_list_string-php7-bug.patch, failed testing.

The last submitted patch, mailchimp_list_string-php7-bug.patch, failed testing.

The last submitted patch, mailchimp_list_string-php7-bug.patch, failed testing.

The last submitted patch, mailchimp_list_string-php7-bug.patch, failed testing.

fortis’s picture

StatusFileSize
new521 bytes

String is not used in MailchimpListsController.php, just remove this line

fortis’s picture

Version: 8.x-1.0-alpha2 » 8.x-1.x-dev
Status: Needs work » Needs review
Issue tags: -#php7 #mailchimp #string +php7, +mailchimp
didier misson’s picture

Hello
I just delete the line with String in MailchimpListsController.php.

All seem ok now.
Thanks
;-)

  • ruscoe committed df60b4a on 8.x-1.x authored by fortis
    Issue #2689143 by henk, fortis: Method "String" is special class name in...
ruscoe’s picture

Status: Needs review » Fixed

The patch in #7 is great, thank you. The patch in the original post worked but also imported Drupal\Component\Utility\SafeMarkup, which isn't used in the file.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.