Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

[ERROR] InvalidArgumentException: Wrong file in C:xampphtdocsmagento2.4libinternalMagentoFrameworkImageAdapterGd2.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;
  }
Source by github.com #
 
PREVIOUS NEXT
Tagged: #Wrong #file #Stack #trace
ADD COMMENT
Topic
Name
9+5 =