summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/controls.php4
-rw-r--r--include/functions.php12
-rw-r--r--include/sessions.php1
3 files changed, 8 insertions, 9 deletions
diff --git a/include/controls.php b/include/controls.php
index 2fa797dbc..b2e71d174 100755
--- a/include/controls.php
+++ b/include/controls.php
@@ -155,8 +155,8 @@
/**
* @param array<string, mixed> $attributes
*/
- function select_feeds_cats(string $name, int $default_id = null, array $attributes = [],
- bool $include_all_cats = true, string $root_id = null, int $nest_level = 0, string $id = ""): string {
+ function select_feeds_cats(string $name, ?int $default_id = null, array $attributes = [],
+ bool $include_all_cats = true, ?string $root_id = null, int $nest_level = 0, string $id = ""): string {
$ret = "";
diff --git a/include/functions.php b/include/functions.php
index 2245a79a0..2d3dd6d1e 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -41,7 +41,7 @@
*
* @deprecated by Prefs::get()
*/
- function get_pref(string $pref_name, int $owner_uid = null) {
+ function get_pref(string $pref_name, ?int $owner_uid = null) {
return Prefs::get($pref_name, $owner_uid ? $owner_uid : $_SESSION["uid"], $_SESSION["profile"] ?? null);
}
@@ -50,7 +50,7 @@
*
* @deprecated by Prefs::set()
*/
- function set_pref(string $pref_name, $value, int $owner_uid = null, bool $strip_tags = true): bool {
+ function set_pref(string $pref_name, $value, ?int $owner_uid = null, bool $strip_tags = true): bool {
return Prefs::set($pref_name, $value, $owner_uid ? $owner_uid : $_SESSION["uid"], $_SESSION["profile"] ?? null, $strip_tags);
}
@@ -211,7 +211,7 @@
*
* @return false|string The HTML, or false if an error occurred.
*/
- function sanitize(string $str, bool $force_remove_images = false, int $owner = null, string $site_url = null, array $highlight_words = null, int $article_id = null) {
+ function sanitize(string $str, bool $force_remove_images = false, ?int $owner = null, ?string $site_url = null, ?array $highlight_words = null, ?int $article_id = null) {
return Sanitizer::sanitize($str, $force_remove_images, $owner, $site_url, $highlight_words, $article_id);
}
@@ -250,17 +250,17 @@
}
/** @deprecated by UserHelper::authenticate() */
- function authenticate_user(string $login = null, string $password = null, bool $check_only = false, string $service = null): bool {
+ function authenticate_user(?string $login = null, ?string $password = null, bool $check_only = false, ?string $service = null): bool {
return UserHelper::authenticate($login, $password, $check_only, $service);
}
/** @deprecated by TimeHelper::smart_date_time() */
- function smart_date_time(int $timestamp, int $tz_offset = 0, int $owner_uid = null, bool $eta_min = false): string {
+ function smart_date_time(int $timestamp, int $tz_offset = 0, ?int $owner_uid = null, bool $eta_min = false): string {
return TimeHelper::smart_date_time($timestamp, $tz_offset, $owner_uid, $eta_min);
}
/** @deprecated by TimeHelper::make_local_datetime() */
- function make_local_datetime(string $timestamp, bool $long, int $owner_uid = null, bool $no_smart_dt = false, bool $eta_min = false): string {
+ function make_local_datetime(string $timestamp, bool $long, ?int $owner_uid = null, bool $no_smart_dt = false, bool $eta_min = false): string {
return TimeHelper::make_local_datetime($timestamp, $long, $owner_uid, $no_smart_dt, $eta_min);
}
diff --git a/include/sessions.php b/include/sessions.php
index c863a4f2c..abc99176f 100644
--- a/include/sessions.php
+++ b/include/sessions.php
@@ -4,7 +4,6 @@
use UserHelper;
require_once "autoload.php";
- require_once "functions.php";
require_once "errorhandler.php";
require_once "lib/gettext/gettext.inc.php";