mirror of
https://github.com/friendica/friendica
synced 2025-04-27 14:30:11 +00:00
Introduce InvalidClassStorageException and adapt the code for it
This commit is contained in:
parent
b798ca2da6
commit
c17bc55158
9 changed files with 259 additions and 267 deletions
|
@ -61,6 +61,10 @@ class Crop extends BaseSettings
|
|||
$base_image = Photo::selectFirst([], ['resource-id' => $resource_id, 'uid' => local_user(), 'scale' => $scale]);
|
||||
if (DBA::isResult($base_image)) {
|
||||
$Image = Photo::getImageForPhoto($base_image);
|
||||
if (empty($Image)) {
|
||||
throw new HTTPException\InternalServerErrorException();
|
||||
}
|
||||
|
||||
if ($Image->isValid()) {
|
||||
// If setting for the default profile, unset the profile photo flag from any other photos I own
|
||||
DBA::update('photo', ['profile' => 0], ['uid' => local_user()]);
|
||||
|
@ -188,6 +192,9 @@ class Crop extends BaseSettings
|
|||
}
|
||||
|
||||
$Image = Photo::getImageForPhoto($photos[0]);
|
||||
if (empty($Image)) {
|
||||
throw new HTTPException\InternalServerErrorException();
|
||||
}
|
||||
|
||||
$imagecrop = [
|
||||
'resource-id' => $resource_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue