summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-10-28 18:43:47 +0300
committerAndrew Dolgov <[email protected]>2023-10-28 18:45:09 +0300
commit855695a8620a3a5ffada836fd28e04bb912bbd3a (patch)
treec1e3a4ae29ec9ad7c6180499f28b9f93ed77fac0 /classes
parent0ac8710ea1b1426bf19bb502ba4921ef35cd1db6 (diff)
add stuff necessary to run integration tests using phpunit
Diffstat (limited to 'classes')
-rw-r--r--classes/Handler.php2
-rw-r--r--classes/Prefs.php2
2 files changed, 2 insertions, 2 deletions
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);