0

I use magento 2.2.6 i have this notice with valiton.php from 2 days, i don't understand why. The message is :

PHP Notice: Undefined index: REQUEST_URI in /var/www/vhosts/bonbonrose.ch/httpdocs/vendor/magento/framework/App/Valitron.php on line 1293

Here the part of code line 1293

 if ($this->validateSecureUrl($_SERVER['REQUEST_URI'])) {
        $secureKey = 'login';
        if (!empty($_POST[$secureKey]) && is_array($_POST[$secureKey])) {
            if ($this->executeSecureValidate($_POST[$secureKey])) {
                return true;
            }
        }

Someone know how to fix ?

0

It looks like you have an old code within Magento Framework package. The following solution helped me:

cd /var/www/vhosts/bonbonrose.ch/httpdocs
rm -rf vendor/magento/framework
composer install

In case if the file persists after performing the above mentioned commands then I would recommend one of the options below:

1) update Magento to a newer release

2) replace the line:

if ($this->validateSecureUrl($_SERVER['REQUEST_URI'])) {

with

if (isset($_SERVER['REQUEST_URI']) && $this->validateSecureUrl($_SERVER['REQUEST_URI'])) {
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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