I am new to this and I need help in figuring out how to fix this error:
Warning: Use of undefined constant HTTP_USER_AGENT - assumed 'HTTP_USER_AGENT' (this will throw an Error in a future version of PHP) in /home/trewonco/public_html/zwp-t0bsb on line 1
This seemed to occur after I had pushed changes from our staging site to our live site, does anyone have an idea why this happened and how to fix it? Thank you very much for the help.
I am new to this and I need help in figuring out how to fix this error:
Warning: Use of undefined constant HTTP_USER_AGENT - assumed 'HTTP_USER_AGENT' (this will throw an Error in a future version of PHP) in /home/trewonco/public_html/zwp-t0bsb on line 1
This seemed to occur after I had pushed changes from our staging site to our live site, does anyone have an idea why this happened and how to fix it? Thank you very much for the help.
Share Improve this question asked Jan 5, 2021 at 15:52 Chris oChris o 112 bronze badges 1- /home/trewonco/public_html/zwp-t0bsb on line 1 - this is not a file reference, what is the full error log ? – Q Studio Commented Jan 5, 2021 at 16:39
1 Answer
Reset to default 2Somewhere in your code you've written $_SERVER[HTTP_USER_AGENT]
.
It needs to be $_SERVER['HTTP_USER_AGENT']
with quotes around 'HTTP_USER_AGENT'
. PHP is telling you it's guessed that's what you meant.