increased test coverage of new lines
This commit is contained in:
parent
a228811a61
commit
46b7bea097
|
|
@ -656,14 +656,12 @@ class Html
|
|||
}
|
||||
}
|
||||
if (strpos($src, 'data:image') !== false) {
|
||||
if (!is_dir(self::$imgdir)) {
|
||||
mkdir(self::$imgdir);
|
||||
}
|
||||
$tmpDir = Settings::getTempDir() . '/';
|
||||
|
||||
$match = array();
|
||||
preg_match('/data:image\/(\w+);base64,(.+)/', $src, $match);
|
||||
|
||||
$src = $imgFile = self::$imgdir . uniqid() . '.' . $match[1];
|
||||
$src = $imgFile = $tmpDir . uniqid() . '.' . $match[1];
|
||||
|
||||
$ifp = fopen($imgFile, 'wb');
|
||||
|
||||
|
|
@ -682,9 +680,6 @@ class Html
|
|||
if (!is_file($src)) {
|
||||
if ($imgBlob = file_get_contents($src)) {
|
||||
$tmpDir = Settings::getTempDir() . '/';
|
||||
if (!is_dir($tmpDir)) {
|
||||
mkdir($tmpDir);
|
||||
}
|
||||
$match = array();
|
||||
preg_match('/.+\.(\w+)$/', $src, $match);
|
||||
$src = $tmpDir . uniqid() . '.' . $match[1];
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue