diff --git a/src/libraries/kunena/src/Config/KunenaConfig.php b/src/libraries/kunena/src/Config/KunenaConfig.php index 43674a40a70..313594779b8 100644 --- a/src/libraries/kunena/src/Config/KunenaConfig.php +++ b/src/libraries/kunena/src/Config/KunenaConfig.php @@ -1819,16 +1819,9 @@ public function getEmail(): string */ public function set($property, $value): bool { - // type checking? - if (property_exists('KunenaConfig', $property)) { - if (strcmp(\gettype($this->$property), \gettype($value)) == 0) { - $this->$property = $value; + $this->$property = $value; - return true; - } - } - - return false; + return true; } /** diff --git a/src/libraries/kunena/src/Route/KunenaRoute.php b/src/libraries/kunena/src/Route/KunenaRoute.php index 19d5551eb03..e6ffacf2073 100644 --- a/src/libraries/kunena/src/Route/KunenaRoute.php +++ b/src/libraries/kunena/src/Route/KunenaRoute.php @@ -995,18 +995,18 @@ public static function fixMissingItemID(): int } /** - * @param KunenaTopic $topic topic - * @param bool $xhtml xhtml - * @param KunenaMessage|string|null $action actions - * @param KunenaCategory|null $category category - * @param int $itemid itemid + * @param KunenaTopic $topic topic + * @param bool $xhtml xhtml + * @param ?KunenaMessage|string $action actions + * @param ?KunenaCategory $category category + * @param int $itemid itemid * * @return boolean * * @since Kunena 6.0 * @throws Exception */ - public static function getTopicUrl(KunenaTopic $topic, bool $xhtml = true, $action = null, KunenaCategory $category = null, $Itemid = 0) + public static function getTopicUrl(KunenaTopic $topic, bool $xhtml = true, $action = null, ?KunenaCategory $category = null, $Itemid = 0) { if (!$category) { $category = $topic->getCategory(); @@ -1018,15 +1018,15 @@ public static function getTopicUrl(KunenaTopic $topic, bool $xhtml = true, $acti /** * @param KunenaMessage $message message * @param bool $xhtml xhtml - * @param KunenaTopic $topic topic - * @param KunenaCategory $category category + * @param ?KunenaTopic $topic topic + * @param ?KunenaCategory $category category * * @return boolean * * @since Kunena 6.0 * @throws Exception */ - public static function getMessageUrl(KunenaMessage $message, $xhtml = true, ?KunenaTopic $topic, ?KunenaCategory $category) + public static function getMessageUrl(KunenaMessage $message, $xhtml = true, ?KunenaTopic $topic = null, ?KunenaCategory $category = null) { // FIXME: not yet fully implemented... if (!$category) {