update kirby

This commit is contained in:
isUnknown 2025-02-07 17:11:37 +01:00
parent 652262ac94
commit 9c662bcbba
165 changed files with 1757 additions and 598 deletions

View file

@ -115,12 +115,19 @@ abstract class Model
$blueprint = null;
}
// convert string blueprint settings to proper array
if (is_string($blueprint) === true) {
$blueprint = ['query' => $blueprint];
}
// skip image thumbnail if option
// is explicitly set to show the icon
if ($settings === 'icon') {
$settings = ['query' => false];
} elseif (is_string($settings) === true) {
// convert string settings to proper array
}
// convert string settings to proper array
if (is_string($settings) === true) {
$settings = ['query' => $settings];
}

View file

@ -235,7 +235,7 @@ class Panel
if ($result === null || $result === false) {
$result = new NotFoundException('The data could not be found');
// interpret strings as errors
// interpret strings as errors
} elseif (is_string($result) === true) {
$result = new Exception($result);
}

View file

@ -330,15 +330,15 @@ class View
if ($data instanceof Redirect) {
return Response::redirect($data->location(), $data->code());
// handle Kirby exceptions
// handle Kirby exceptions
} elseif ($data instanceof Exception) {
$data = static::error($data->getMessage(), $data->getHttpCode());
// handle regular exceptions
// handle regular exceptions
} elseif ($data instanceof Throwable) {
$data = static::error($data->getMessage(), 500);
// only expect arrays from here on
// only expect arrays from here on
} elseif (is_array($data) === false) {
$data = static::error('Invalid Panel response', 500);
}