When enabling the module on a site using PHP 7.1 the following error is thrown:
Fatal error: Cannot use Drupal\Component\Utility\String as String because 'String' is a special class name in login_redirect.module on line 9
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | replace_calls_with_safemarkup-2921237-4.patch | 975 bytes | karuna patel |
| #2 | login_redirect-n2921237-2.patch | 955 bytes | damienmckenna |
Comments
Comment #2
damienmckennaThis removes the use statement in favor of a longer declaration.
Comment #3
astonvictor commentedCannot find \Drupal\Component\Utility\String class. I think we should use \Drupal\Component\Utility\SafeMarkup.
Comment #4
karuna patel commented"String" will be a reserved word in PHP 7. The class \Drupal\Component\Utility\String is removed.
Replace calls to \Drupal\Component\Utility\String with calls to \Drupal\Component\Utility\SafeMarkup.
I have attached patch to fix this issue.