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 ?
    – Q Studio
    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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.