To what was that variable set before? Because before it was apparently set to something else it would not behave different now. Or do you have a .env file?
Great that you got it working. If you have it in the .env file it should normally read it automatically. So if you do not have one yet or if it is not set there that should avoid that to be happen again in the future.