Answers for "[ERROR] InvalidArgumentException: Wrong file in C:\xampp\htdocs\magento2.4\lib\internal\Magento\Framework\Image\Adapter\Gd2.php:64 Stack trace"

PHP
0

[ERROR] InvalidArgumentException: Wrong file in C:\xampp\htdocs\magento2.4\lib\internal\Magento\Framework\Image\Adapter\Gd2.php:64 Stack trace

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) && !file_exists($filename)) {
          return false;
      }

      return true;
  }
Posted by: Guest on September-02-2020

Code answers related to "[ERROR] InvalidArgumentException: Wrong file in C:\xampp\htdocs\magento2.4\lib\internal\Magento\Framework\Image\Adapter\Gd2.php:64 Stack trace"

Browse Popular Code Answers by Language