X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2Fapi%2FApiUtils.php;h=eb1ca9bc2b6230e944350759c33386acced2770f;hb=dff039092d180fffa89e7d88f7a4b7bc24dfc80f;hp=4a6326f0f7dccc38651f6b8daf979b896cbc1c36;hpb=458b6b9918ec27154dd45416947bb93bedb97109;p=github%2Fshaarli%2FShaarli.git diff --git a/application/api/ApiUtils.php b/application/api/ApiUtils.php index 4a6326f0..eb1ca9bc 100644 --- a/application/api/ApiUtils.php +++ b/application/api/ApiUtils.php @@ -89,12 +89,12 @@ class ApiUtils * If no URL is provided, it will generate a local note URL. * If no title is provided, it will use the URL as title. * - * @param array $input Request Link. - * @param bool $defaultPrivate Request Link. + * @param array|null $input Request Link. + * @param bool $defaultPrivate Setting defined if a bookmark is private by default. * * @return Bookmark instance. */ - public static function buildBookmarkFromRequest($input, $defaultPrivate): Bookmark + public static function buildBookmarkFromRequest(?array $input, bool $defaultPrivate): Bookmark { $bookmark = new Bookmark(); $url = ! empty($input['url']) ? cleanup_url($input['url']) : '';