Home > Mobile >  wordpress siite: Warning: Undefined array key "scheme"
wordpress siite: Warning: Undefined array key "scheme"

Time:09-11

I have downloades alle the files of the wordpress site and now I want to run it local.

But if I now go to my localsite: http://localhost:8080/nieuwdenhaag/index.php

I get this errors:

Warning: Undefined array key "scheme" in E:\Xampp\htdocs\nieuwdenhaag\wp-includes\canonical.php on line 720

Warning: Undefined array key "host" in E:\Xampp\htdocs\nieuwdenhaag\wp-includes\canonical.php on line 687

Warning: Undefined array key "host" in E:\Xampp\htdocs\nieuwdenhaag\wp-includes\canonical.php on line 696

Warning: Undefined array key "host" in E:\Xampp\htdocs\nieuwdenhaag\wp-includes\canonical.php on line 699

Warning: Undefined array key "scheme" in E:\Xampp\htdocs\nieuwdenhaag\wp-includes\canonical.php on line 720 

So I checked the canonical file. And for example the line 720 I see this:

if ( $compare_original !== $compare_redirect ) {
        $redirect_url = $redirect['scheme'] . '://' . $redirect['host'];
 

But what I have to change there?

Or uberhaupt. What is causing this errors?

Thank you

CodePudding user response:

Where does the $redirect array come from?
Add these 3 lines of code to troubleshoot $redirect.
Then you will see why there is a problem.

echo ,'<pre>';
var_export($redirect);
exit;
if ( $compare_original !== $compare_redirect ) {
        $redirect_url = $redirect['scheme'] . '://' . $redirect['host'];
  • Related