mirror of
https://github.com/friendica/friendica
synced 2025-04-26 10:30:11 +00:00
Cleanup
This commit is contained in:
parent
a338e4cbff
commit
06371d29a6
5 changed files with 19 additions and 14 deletions
|
@ -492,17 +492,17 @@ class Photo
|
|||
if (!empty($image_url)) {
|
||||
$ret = DI::httpRequest()->get($image_url);
|
||||
$img_str = $ret->getBody();
|
||||
$contType = $ret->getContentType();
|
||||
$type = $ret->getContentType();
|
||||
} else {
|
||||
$img_str = '';
|
||||
$contType = '';
|
||||
$type = '';
|
||||
}
|
||||
|
||||
if ($quit_on_error && ($img_str == "")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$type = Images::getMimeTypeByData($img_str, $image_url, $contType);
|
||||
$type = Images::getMimeTypeByData($img_str, $image_url, $type);
|
||||
|
||||
$Image = new Image($img_str, $type);
|
||||
if ($Image->isValid()) {
|
||||
|
|
|
@ -1095,13 +1095,13 @@ class User
|
|||
$curlResult = DI::httpRequest()->get($photo);
|
||||
if ($curlResult->isSuccess()) {
|
||||
$img_str = $curlResult->getBody();
|
||||
$contType = $curlResult->getContentType();
|
||||
$type = $curlResult->getContentType();
|
||||
} else {
|
||||
$img_str = '';
|
||||
$contType = '';
|
||||
$type = '';
|
||||
}
|
||||
|
||||
$type = Images::getMimeTypeByData($img_str, $photo, $contType);
|
||||
$type = Images::getMimeTypeByData($img_str, $photo, $type);
|
||||
|
||||
$Image = new Image($img_str, $type);
|
||||
if ($Image->isValid()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue