Magento 2.3.6-p1 安装不完整并在安装时在 Magento_Theme 中显示错误

问题描述

当我尝试在 Windows 中的 xampp 服务器上安装 magento 2.3.6 时,我在 magento 模块中收到错误,即 Magento_Theme 和错误是关于无效参数异常并说错误文件 /vendor/magento/framework/Image/Adapter/Gd2.PHP 带有这个 messafe 64 堆栈跟踪:0。

Full Image with error

解决方法

我在谷歌上搜索过这个答案,然后我得到了答案。

我替换了第 86 行的一个函数。 供应商\magento\framework\Image\Adapter\Gd2.php

private function validateURLScheme(string $filename) : bool
{
    $allowed_schemes = ['ftp','ftps','http','https'];
    $url = parse_url($filename);
    if ($url && isset($url['scheme']) && !in_array($url['scheme'],$allowed_schemes)) {
        return false;
    }

    return true;
}

替换为下面的函数

    private function validateURLScheme(string $filename) : bool
      {
          $allowed_schemes = ['ftp','https'];
          $url = parse_url($filename);
          if ($url && isset($url['scheme']) && !in_array($url['scheme'],$allowed_schemes) && !file_exists($filename)) {
              return false;
          }

          return true;
      }
      }

After Change the code successful installation complete