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

Fixed error on user page.#28

Open
danepowell wants to merge 1 commit intoacquia:8.x-1.xfrom
danepowell:feature/user-route-error
Open

Fixed error on user page.#28
danepowell wants to merge 1 commit intoacquia:8.x-1.xfrom
danepowell:feature/user-route-error

Conversation

@danepowell
Copy link
Copy Markdown

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
Copy Markdown

@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.

3 participants