Update 3rd party libraries
Forgot these two
This commit is contained in:
@ -55,7 +55,7 @@ class TCPDF_STATIC {
|
||||
* Current TCPDF version.
|
||||
* @private static
|
||||
*/
|
||||
private static $tcpdf_version = '6.2.17';
|
||||
private static $tcpdf_version = '6.2.22';
|
||||
|
||||
/**
|
||||
* String alias for total number of pages.
|
||||
@ -1774,39 +1774,6 @@ class TCPDF_STATIC {
|
||||
return $angle;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ====================================================================================================================
|
||||
// REIMPLEMENTED
|
||||
// ====================================================================================================================
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Split string by a regular expression.
|
||||
* This is a wrapper for the preg_split function to avoid the bug: https://bugs.php.net/bug.php?id=45850
|
||||
@ -1854,6 +1821,33 @@ class TCPDF_STATIC {
|
||||
return fopen($filename, $mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper for file_exists.
|
||||
* Checks whether a file or directory exists.
|
||||
* Only allows some protocols and local files.
|
||||
* @param filename (string) Path to the file or directory.
|
||||
* @return Returns TRUE if the file or directory specified by filename exists; FALSE otherwise.
|
||||
* @public static
|
||||
*/
|
||||
public static function file_exists($filename) {
|
||||
if (strpos($filename, '://') > 0) {
|
||||
$wrappers = stream_get_wrappers();
|
||||
foreach ($wrappers as $wrapper) {
|
||||
if (($wrapper === 'http') || ($wrapper === 'https')) {
|
||||
continue;
|
||||
}
|
||||
if (stripos($filename, $wrapper.'://') === 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!@file_exists($filename)) {
|
||||
// try to encode spaces on filename
|
||||
$filename = str_replace(' ', '%20', $filename);
|
||||
}
|
||||
return @file_exists($filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads entire file into a string.
|
||||
* The file can be also an URL.
|
||||
@ -1914,8 +1908,10 @@ class TCPDF_STATIC {
|
||||
}
|
||||
//
|
||||
$alt = array_unique($alt);
|
||||
//var_dump($alt);exit;//DEBUG
|
||||
foreach ($alt as $path) {
|
||||
if (!self::file_exists($path)) {
|
||||
return false;
|
||||
}
|
||||
$ret = @file_get_contents($path);
|
||||
if ($ret !== false) {
|
||||
return $ret;
|
||||
@ -1949,8 +1945,6 @@ class TCPDF_STATIC {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get ULONG from string (Big Endian 32-bit unsigned integer).
|
||||
* @param $str (string) string from where to extract value
|
||||
|
Reference in New Issue
Block a user