Philipp 2023-01-01 22:34:01 +01:00
parent fde223327f
commit f8f3689a0d
No known key found for this signature in database
GPG key ID: 24A7501396EB5432

View file

@ -31,6 +31,7 @@ use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Database\DBStructure;
use Friendica\DI;
use Friendica\Model\Contact;
use Friendica\Model\Item;
@ -923,7 +924,7 @@ function photos_content(App $a)
if ($order_field === 'created') {
$params = ['order' => [$order_field]];
} elseif (!empty($order_field)) {
} elseif (!empty($order_field) && DBStructure::existsColumn('photo', [$order_field])) {
$params = ['order' => [$order_field => true]];
} else {
$params = [];