Update Kirby to 3.7.4

This commit is contained in:
Lukas Bestle
2022-08-23 21:36:13 +02:00
parent 435b9f4541
commit d89a0a647c
674 changed files with 212 additions and 61 deletions

0
kirby/src/Api/Api.php Executable file → Normal file
View File

0
kirby/src/Api/Collection.php Executable file → Normal file
View File

0
kirby/src/Api/Model.php Executable file → Normal file
View File

0
kirby/src/Cache/ApcuCache.php Executable file → Normal file
View File

0
kirby/src/Cache/Cache.php Executable file → Normal file
View File

0
kirby/src/Cache/FileCache.php Executable file → Normal file
View File

0
kirby/src/Cache/MemCached.php Executable file → Normal file
View File

0
kirby/src/Cache/MemoryCache.php Executable file → Normal file
View File

0
kirby/src/Cache/NullCache.php Executable file → Normal file
View File

0
kirby/src/Cache/Value.php Executable file → Normal file
View File

0
kirby/src/Cms/Api.php Executable file → Normal file
View File

0
kirby/src/Cms/App.php Executable file → Normal file
View File

0
kirby/src/Cms/AppCaches.php Executable file → Normal file
View File

0
kirby/src/Cms/AppErrors.php Executable file → Normal file
View File

0
kirby/src/Cms/AppPlugins.php Executable file → Normal file
View File

0
kirby/src/Cms/AppTranslations.php Executable file → Normal file
View File

0
kirby/src/Cms/AppUsers.php Executable file → Normal file
View File

0
kirby/src/Cms/Auth.php Executable file → Normal file
View File

0
kirby/src/Cms/Auth/Challenge.php Executable file → Normal file
View File

0
kirby/src/Cms/Auth/EmailChallenge.php Executable file → Normal file
View File

0
kirby/src/Cms/Auth/Status.php Executable file → Normal file
View File

0
kirby/src/Cms/Block.php Executable file → Normal file
View File

0
kirby/src/Cms/Blocks.php Executable file → Normal file
View File

0
kirby/src/Cms/Blueprint.php Executable file → Normal file
View File

0
kirby/src/Cms/Collection.php Executable file → Normal file
View File

0
kirby/src/Cms/Collections.php Executable file → Normal file
View File

0
kirby/src/Cms/Content.php Executable file → Normal file
View File

0
kirby/src/Cms/ContentLock.php Executable file → Normal file
View File

0
kirby/src/Cms/ContentLocks.php Executable file → Normal file
View File

0
kirby/src/Cms/ContentTranslation.php Executable file → Normal file
View File

0
kirby/src/Cms/Core.php Executable file → Normal file
View File

0
kirby/src/Cms/Email.php Executable file → Normal file
View File

0
kirby/src/Cms/Event.php Executable file → Normal file
View File

0
kirby/src/Cms/Field.php Executable file → Normal file
View File

0
kirby/src/Cms/Fieldset.php Executable file → Normal file
View File

0
kirby/src/Cms/Fieldsets.php Executable file → Normal file
View File

0
kirby/src/Cms/File.php Executable file → Normal file
View File

0
kirby/src/Cms/FileActions.php Executable file → Normal file
View File

0
kirby/src/Cms/FileBlueprint.php Executable file → Normal file
View File

0
kirby/src/Cms/FileModifications.php Executable file → Normal file
View File

0
kirby/src/Cms/FilePermissions.php Executable file → Normal file
View File

0
kirby/src/Cms/FilePicker.php Executable file → Normal file
View File

0
kirby/src/Cms/FileRules.php Executable file → Normal file
View File

0
kirby/src/Cms/FileVersion.php Executable file → Normal file
View File

0
kirby/src/Cms/Files.php Executable file → Normal file
View File

0
kirby/src/Cms/Find.php Executable file → Normal file
View File

0
kirby/src/Cms/HasChildren.php Executable file → Normal file
View File

0
kirby/src/Cms/HasFiles.php Executable file → Normal file
View File

0
kirby/src/Cms/HasMethods.php Executable file → Normal file
View File

0
kirby/src/Cms/HasSiblings.php Executable file → Normal file
View File

41
kirby/src/Cms/Helpers.php Executable file → Normal file
View File

@@ -2,6 +2,7 @@
namespace Kirby\Cms;
use Closure;
use Kirby\Exception\InvalidArgumentException;
use Kirby\Toolkit\Str;
@@ -46,6 +47,46 @@ class Helpers
return ($kirby->component('dump'))($kirby, $variable, $echo);
}
/**
* Performs an action with custom handling
* for all PHP errors and warnings
* @since 3.7.4
*
* @param \Closure $action Any action that may cause an error or warning
* @param \Closure $handler Custom callback like for `set_error_handler()`;
* the first argument is a return value override passed
* by reference, the additional arguments come from
* `set_error_handler()`; returning `false` activates
* error handling by Whoops and/or PHP
* @return mixed Return value of the `$action` closure, possibly overridden by `$handler`
*/
public static function handleErrors(Closure $action, Closure $handler)
{
$override = $oldHandler = null;
$oldHandler = set_error_handler(function () use (&$override, &$oldHandler, $handler) {
$handlerResult = $handler($override, ...func_get_args());
if ($handlerResult === false) {
// handle other warnings with Whoops if loaded
if (is_callable($oldHandler) === true) {
return $oldHandler(...func_get_args());
}
// otherwise use the standard error handler
return false; // @codeCoverageIgnore
}
// no additional error handling
return true;
});
$result = $action();
restore_error_handler();
return $override ?? $result;
}
/**
* Checks if a helper was overridden by the user
* by setting the `KIRBY_HELPER_*` constant

0
kirby/src/Cms/Html.php Executable file → Normal file
View File

0
kirby/src/Cms/Ingredients.php Executable file → Normal file
View File

0
kirby/src/Cms/Item.php Executable file → Normal file
View File

0
kirby/src/Cms/Items.php Executable file → Normal file
View File

0
kirby/src/Cms/Language.php Executable file → Normal file
View File

0
kirby/src/Cms/LanguageRouter.php Executable file → Normal file
View File

0
kirby/src/Cms/LanguageRoutes.php Executable file → Normal file
View File

0
kirby/src/Cms/LanguageRules.php Executable file → Normal file
View File

0
kirby/src/Cms/Languages.php Executable file → Normal file
View File

0
kirby/src/Cms/Layout.php Executable file → Normal file
View File

0
kirby/src/Cms/LayoutColumn.php Executable file → Normal file
View File

0
kirby/src/Cms/LayoutColumns.php Executable file → Normal file
View File

0
kirby/src/Cms/Layouts.php Executable file → Normal file
View File

0
kirby/src/Cms/Loader.php Executable file → Normal file
View File

0
kirby/src/Cms/Media.php Executable file → Normal file
View File

0
kirby/src/Cms/Model.php Executable file → Normal file
View File

0
kirby/src/Cms/ModelPermissions.php Executable file → Normal file
View File

0
kirby/src/Cms/ModelWithContent.php Executable file → Normal file
View File

0
kirby/src/Cms/Nest.php Executable file → Normal file
View File

0
kirby/src/Cms/NestCollection.php Executable file → Normal file
View File

0
kirby/src/Cms/NestObject.php Executable file → Normal file
View File

0
kirby/src/Cms/Page.php Executable file → Normal file
View File

0
kirby/src/Cms/PageActions.php Executable file → Normal file
View File

0
kirby/src/Cms/PageBlueprint.php Executable file → Normal file
View File

0
kirby/src/Cms/PagePermissions.php Executable file → Normal file
View File

0
kirby/src/Cms/PagePicker.php Executable file → Normal file
View File

0
kirby/src/Cms/PageRules.php Executable file → Normal file
View File

0
kirby/src/Cms/PageSiblings.php Executable file → Normal file
View File

0
kirby/src/Cms/Pages.php Executable file → Normal file
View File

0
kirby/src/Cms/Pagination.php Executable file → Normal file
View File

0
kirby/src/Cms/Permissions.php Executable file → Normal file
View File

0
kirby/src/Cms/Picker.php Executable file → Normal file
View File

0
kirby/src/Cms/Plugin.php Executable file → Normal file
View File

0
kirby/src/Cms/PluginAssets.php Executable file → Normal file
View File

0
kirby/src/Cms/R.php Executable file → Normal file
View File

0
kirby/src/Cms/Responder.php Executable file → Normal file
View File

0
kirby/src/Cms/Response.php Executable file → Normal file
View File

0
kirby/src/Cms/Role.php Executable file → Normal file
View File

0
kirby/src/Cms/Roles.php Executable file → Normal file
View File

0
kirby/src/Cms/S.php Executable file → Normal file
View File

0
kirby/src/Cms/Search.php Executable file → Normal file
View File

0
kirby/src/Cms/Section.php Executable file → Normal file
View File

0
kirby/src/Cms/Site.php Executable file → Normal file
View File

0
kirby/src/Cms/SiteActions.php Executable file → Normal file
View File

0
kirby/src/Cms/SiteBlueprint.php Executable file → Normal file
View File

0
kirby/src/Cms/SitePermissions.php Executable file → Normal file
View File

0
kirby/src/Cms/SiteRules.php Executable file → Normal file
View File

0
kirby/src/Cms/Structure.php Executable file → Normal file
View File

0
kirby/src/Cms/StructureObject.php Executable file → Normal file
View File

Some files were not shown because too many files have changed in this diff Show More