Skip to content
Snippets Groups Projects
Commit 51b72767 authored by David Siegfried's avatar David Siegfried Committed by Jan-Hendrik Willms
Browse files

prevent php8 warnings, closes #2362

Closes #2362

Merge request studip/studip!1549
parent f060a88c
No related branches found
No related tags found
No related merge requests found
......@@ -464,7 +464,7 @@ class NewsController extends StudipController
}
// apply filter
if (Request::submitted('apply_news_filter')) {
$this->news_isvisible['basic'] = !$this->news_isvisible['basic'];
$this->news_isvisible['basic'] = empty($this->news_isvisible['basic']);
if (Request::get('news_searchterm') && mb_strlen(trim(Request::get('news_searchterm'))) < 3) {
PageLayout::postError(_('Der Suchbegriff muss mindestens 3 Zeichen lang sein.'));
} elseif ((Request::get('news_startdate') && !$this->getTimeStamp(Request::get('news_startdate'))) || (Request::get('news_enddate') && !$this->getTimeStamp(Request::get('news_enddate'), 'end'))) {
......@@ -537,7 +537,7 @@ class NewsController extends StudipController
}
// check if result set too big
$counter++;
if ($counter == $limit + 1) {
if ($counter === $limit + 1) {
PageLayout::postInfo(sprintf(_('Es werden nur die ersten %s Ankündigungen angezeigt.'), $limit));
unset($this->news_items[$type][$key]);
}
......
......@@ -61,7 +61,7 @@ abstract class Interactable
$class = self::hyphenate(mb_substr($name, 6));
# a.) set name unless set
if (!is_string(@$args[1])) {
if (empty($args[1]) || !is_string($args[1])) {
$interactable->attributes['name'] = $class;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment