1

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.

1
  • /home/trewonco/public_html/zwp-t0bsb on line 1 - this is not a file reference, what is the full error log ? Commented Jan 5, 2021 at 16:39

1 Answer 1

2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.