mirror of
https://github.com/tecnickcom/TCPDF.git
synced 2025-03-24 16:09:40 +01:00
Add url as an alternative path instead of returning directly
When TCPDF_STATIC::fileGetContents is called with a relative path while $_SERVER['SCRIPT_URI'] is set, this method _always_ used the web-url to retrieve the contents.
This commit is contained in:
parent
95c5938aaf
commit
3a1950ba8a
@ -1910,7 +1910,7 @@ class TCPDF_STATIC {
|
||||
&& !preg_match('%^//%', $file)
|
||||
) {
|
||||
$urldata = @parse_url($_SERVER['SCRIPT_URI']);
|
||||
return $urldata['scheme'].'://'.$urldata['host'].(($file[0] == '/') ? '' : '/').$file;
|
||||
$alt[] = $urldata['scheme'].'://'.$urldata['host'].(($file[0] == '/') ? '' : '/').$file;
|
||||
}
|
||||
//
|
||||
$alt = array_unique($alt);
|
||||
|
Loading…
x
Reference in New Issue
Block a user