0

I changed all http to https within my database and my website was working fine. Then I uploaded the latest version of Wordpress and now I have this Notice:

"Use of undefined constant REQUEST_URI - assumed 'REQUEST_URI' in /path[...]/functions.php on line 73".

The code I have in functions.php on line 73 is:

$path = $_SERVER['HTTP_HOST'] . $_SERVER[REQUEST_URI];

I've been searching for a solution for a while and as I'm a beginner and i'm not sure how to fix it, I thought it would be better stop and look for help form you guys.

Shall I update the database backup and try to change http:// to https:// again or there is another way to fix this?

Thanks in advance

Gio

Gio
  • 35
  • 4
  • 2
    missing some quotes –  Nov 17 '17 at 02:00
  • Why don't you try what the error message suggests; put `REQUEST_URI` in quotes? – Ken Y-N Nov 17 '17 at 02:00
  • It is just as the error stated. The script didn't have a constant named REQUEST_URI. Put a quote around that – Pratansyah Nov 17 '17 at 02:06
  • Just to clarify, $_SERVER is an array with **named_keys**, they are not numeric and you need supply the key as a string (unless you previously assigned the key name to a constant or variable then you would use that but im not sure why you would). – CodingInTheUK Nov 17 '17 at 03:06

0 Answers0