Project

General

Profile

Actions

Bug #78402

closed

Scrutinizer issues: ShortcutToolbarItem.php

Added by Marc Willmann about 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-10-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

https://scrutinizer-ci.com/g/TYPO3/TYPO3.CMS/issues/master/files/typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php?selectedLabels%5B0%5D=9&orderField=path&order=asc&honorSelectedPaths=0

It seems like $pageRow defined by \TYPO3\CMS\Backend\Utili...9;pages', $pageId) on line 304 can also be of type null; however, TYPO3\CMS\Core\Authentic...n::doesUserHaveAccess() does only seem to accept array, maybe add an additional type check?

It seems like $module defined by \TYPO3\CMS\Core\Utility\...OST on line 644 can also be of type array; however, TYPO3\CMS\Backend\Backen...lbarItem::addShortcut() does only seem to accept string, maybe add an additional type check?

The variable $pageId does not seem to be defined for all execution paths leading up to this point.

The expression $backendUser->isInWebMount($pageId) of type integer|null is loosely compared to false; this is ambiguous if the integer can be zero. You might want to explicitly use === null instead.

Actions

Also available in: Atom PDF