Browse Source

fix for input URL with no path

pull/2/merge 0.1.10
Aaron Parecki 4 years ago
parent
commit
8aab37d974
No known key found for this signature in database GPG Key ID: 276C2817346D6056
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/p3k/HTTP/Test.php

+ 1
- 1
src/p3k/HTTP/Test.php View File

@ -58,7 +58,7 @@ class Test implements Transport {
$parts = parse_url($url); $parts = parse_url($url);
if($parts['path']) { if($parts['path']) {
$parts['path'] = '/'.str_replace('/','_',substr($parts['path'],1)); $parts['path'] = '/'.str_replace('/','_',substr($parts['path'],1));
if($parts['path'] == '/')
if(!isset($parts['path']) || $parts['path'] == '/')
$parts['path'] = '/_'; $parts['path'] = '/_';
$filepathurl = self::_build_url($parts); $filepathurl = self::_build_url($parts);
} }

Loading…
Cancel
Save