X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FUtils.php;h=72c90049b9b41c3e7926bede39c4caf6facc2a6a;hb=7b2ba6ef820335df682fbe3dcfaceef3a62cf4a5;hp=4b7fc5464916495ec9f9189270edbd7d43d2b53c;hpb=c653ae3bfb11f663a52f55817e6d02a66d0852c8;p=github%2Fshaarli%2FShaarli.git diff --git a/application/Utils.php b/application/Utils.php index 4b7fc546..72c90049 100644 --- a/application/Utils.php +++ b/application/Utils.php @@ -87,7 +87,7 @@ function endsWith($haystack, $needle, $case = true) * * @param mixed $input Data to escape: a single string or an array of strings. * - * @return string escaped. + * @return string|array escaped. */ function escape($input) { @@ -294,15 +294,15 @@ function normalize_spaces($string) * Requires php-intl to display international datetimes, * otherwise default format '%c' will be returned. * - * @param DateTime $date to format. - * @param bool $time Displays time if true. - * @param bool $intl Use international format if true. + * @param DateTimeInterface $date to format. + * @param bool $time Displays time if true. + * @param bool $intl Use international format if true. * * @return bool|string Formatted date, or false if the input is invalid. */ function format_date($date, $time = true, $intl = true) { - if (! $date instanceof DateTime) { + if (! $date instanceof DateTimeInterface) { return false; }