You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you get the referer from craft.app.request.referrer and there is no referer it should return null. But the type casting only allows the function to return a string so it throws an error.
Return value of craft\web\twig\variables\Request::getUrlReferrer() must be of the type string, null returned
Steps to reproduce
get referer from craft.app.request.referrer in your twig template
refresh page
Additional info
Craft version: 3.1.19 (Pro)
PHP version: 7.1.27
OS version: Linux 3.10.0-862.14.4.el7.x86_64
Database driver & version: MySQL 5.5.5
Image driver & version: GD 7.1.27
Plugins & versions:
Contact Form 2.2.3
Contact Form Extensions 1.1.1
Contact Form Honeypot 1.0.2
Cookie Consent Banner 1.1.2
Craft Commerce 2.1.2
Image Resizer 2.0.4
Instant Analytics 1.1.0
Linkit 1.1.10
Logs 3.0.0
Mailchimp Subscribe v2.0.4
Mailgun 1.4.2
Mollie for Craft Commerce 2.0.1
Navigation 1.1.11
Redactor 2.3.2
SEOmatic 3.1.46
Video Embedder 1.1.1
VZ URL 2.1.1
The text was updated successfully, but these errors were encountered:
Thanks for reporting that! Fixed for the next release.
Note that craft.request.getUrlReferrer()/craft.request.urlReferrer has been deprecated in Craft 3. You should be using craft.app.request.referrer instead.
Description
When you get the referer from craft.app.request.referrer and there is no referer it should return null. But the type casting only allows the function to return a string so it throws an error.
Return value of craft\web\twig\variables\Request::getUrlReferrer() must be of the type string, null returned
Steps to reproduce
Additional info
The text was updated successfully, but these errors were encountered: