From 855695a8620a3a5ffada836fd28e04bb912bbd3a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 28 Oct 2023 18:43:47 +0300 Subject: add stuff necessary to run integration tests using phpunit --- classes/Handler.php | 2 +- classes/Prefs.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/Handler.php b/classes/Handler.php index 5b54570d8..2676632bb 100644 --- a/classes/Handler.php +++ b/classes/Handler.php @@ -28,7 +28,7 @@ class Handler implements IHandler { /** * @param mixed $p */ - protected static function _param_to_bool($p): bool { + public static function _param_to_bool($p): bool { $p = clean($p); return $p && ($p !== "f" && $p !== "false"); } diff --git a/classes/Prefs.php b/classes/Prefs.php index 9d68a14b7..6dc8a1342 100644 --- a/classes/Prefs.php +++ b/classes/Prefs.php @@ -343,7 +343,7 @@ class Prefs { $value = Config::cast_to($value, $type_hint); if ($value == $this->_get($pref_name, $owner_uid, $profile_id)) - return false; + return true; // no need to actually set this to the same value, let's just say we did $this->_set_cache($pref_name, $value, $owner_uid, $profile_id); -- cgit v1.2.3