微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。