Skip to content
This repository has been archived by the owner on Nov 16, 2018. It is now read-only.

Fixed error on user page. #28

Open
wants to merge 1 commit into
base: 8.x-1.x
Choose a base branch
from

Conversation

danepowell
Copy link

When you visit the user page (admin/access/users) on a cold cache, you get the following error:

Warning: strpos() expects parameter 1 to be string, object given in Drupal\Component\Utility\UrlHelper::stripDangerousProtocols() (line 352 of core/lib/Drupal/Component/Utility/UrlHelper.php)

This is because Url:fromRoute returns a URL object, not a string.

Copy link

@snufkin snufkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change correctly uses the toString() method to cast the URL object into string, which resolves the error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants