Skip to content

Commit 1831698

Browse files
committed
fix: corrected type errors
1 parent 17cc39e commit 1831698

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

phpmyfaq/src/phpMyFAQ/Administration/Session.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ public function getTimeFromSessionId(int $sessionId): int
7777

7878
if ($result) {
7979
$res = $this->configuration->getDb()->fetchObject($result);
80-
$timestamp = $res->time;
80+
$timestamp = (int) $res->time;
8181
}
8282

8383
return $timestamp;
8484
}
8585

8686
/**
87-
* Returns all session from a date.
87+
* Returns all sessions from a date.
8888
*
8989
* @param int $firstHour First hour
9090
* @param int $lastHour Last hour

phpmyfaq/src/phpMyFAQ/Controller/Administration/CategoryController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ public function update(Request $request): Response
570570
$categoryEntity
571571
->setId($categoryId)
572572
->setLang($categoryLang)
573-
->setParentId($parentId)
573+
->setParentId((int) $parentId)
574574
->setName(Filter::filterVar($request->get('name'), FILTER_SANITIZE_SPECIAL_CHARS))
575575
->setDescription(Filter::filterVar($request->get('description'), FILTER_SANITIZE_SPECIAL_CHARS))
576576
->setUserId(Filter::filterVar($request->get('user_id'), FILTER_VALIDATE_INT))

0 commit comments

Comments
 (0)