Support » Theme: Slanted » Warning: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’

  • Resolved ustoopia


    I just wanted to let you know that with debug enabled I was receiving an error message for the Slanted theme. I fixed the issue myself by editing a line in functions.php and it no longer shows the error message for me. The error was:

    Warning: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’ (this will throw an Error in a future version of PHP) in /var/www/web33/web/wp-content/themes/slanted-master/functions.php on line 73

    So on line 73 in functions.php I changed the line mentioned in the error message to:

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


Viewing 15 replies - 1 through 15 (of 34 total)
  • Theme Author Alexander Agnarson



    Thanks for reporting!

    Where did you download the theme from? Line 73 for me just has some standard add_image_size code in functions.php that should cause no issues.

    Was it some custom code you added?



    There was no custom code. I downloaded it through the WP-admin pages. I should mention that I’m on a multisite environment. I should also mention that I encountered more themes that give me the exact same error so it’s probably not your code but something at my end that is causing this.

    For me line 73 had the following string in it:
    $_SERVER[REQUEST_URI] (so without the ‘ marks around REQUEST_URI).

    I added the ” and now it shows:

    That got rid of the error message, so I’m good.
    This might be a bit naive of me but I’m pretty sure that this change won’t cause any other problems. What do you think?

    Theme Author Alexander Agnarson


    Ah. Hm, sounds like something on your end, as you say.

    If that fix worked for you without issues, then I’d say go with it for now, and if you run into future issues, you know what you edited and can easily change it.



    Thanks. And sorry for posting this issue here before I actually did some more testing myself 🙂

    Great work on the slanted theme btw. I’m loving it!

    Theme Author Alexander Agnarson


    No worries, glad to hear! 🙂

    Hello everyone!

    I have the same problem.
    Warning: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’ (this will throw an Error in a future version of PHP) in /homepages/15/d765853453/htdocs/clickandbuilds/JaspalSampla/wp-content/themes/twentynineteen/functions.php on line 73
    I have checked the whole file (functions.php), but there is no such constant – REQUEST_URI and I have no idea how to fix it.
    Do you have any suggestions about how to fix it?


    i have facing above same error please anybody help me.

    User $_SERVER[‘REQUEST_URI’]; instead of $_SERVER[REQUEST_URI];.
    This may solve the problem.



    The issue was regarding the twentyfourteen theme in my case (am i right @alxmedia ?) and thanks @ustoopia for the help 🙂



    Would appreciate help for future issues from you guys 🙂

    Thank you buddy!!!
    you save my week



    same message I got
    and I can’t login to admin
    anybody can help me please



    @wbtech2018 Você deve entrar em contato com o site de hospedagem para atualizar a versão do PHP e também solicitar upgrade na página de login (wp-admin)…



    Just to say thank you,
    @ustoopia solution helped

    @ustoopia It Worked.

    Big Big Thanks from Blogeshwar

Viewing 15 replies - 1 through 15 (of 34 total)
  • You must be logged in to reply to this topic.