Bug #51420
closednon static method getAvailableWorkspaces()
100%
Description
I had such an error message in TYPO3 6.1.3
PHP Runtime Notice: Non-static method TYPO3\\CMS\\Workspaces\\Service\\WorkspaceService::getAvailableWorkspaces() should not be called statically, assuming $this from incompatible context in D:\\wamp\\www\\typo3_src-6.1.3\\typo3\\sysext\\workspaces\\Classes\\ExtDirect\\WorkspaceSelectorToolbarItem.php line 78
When I made this method static in \typo3\sysext\workspaces\Classes\Service\WorkspaceService.php then message disappears.
Updated by Jan Schreier over 10 years ago
I get the same error message in 6.2.3 but I think it should be fixed by update WorkspaceSelectorToolbarItem.php
just replace this line:
$availableWorkspaces = \TYPO3\CMS\Workspaces\Service\WorkspaceService::getAvailableWorkspaces();
with the following lines (from the same file some lines above):
/** @var \TYPO3\CMS\Workspaces\Service\WorkspaceService $wsService */
$wsService = GeneralUtility::makeInstance('TYPO3\\CMS\\Workspaces\\Service\\WorkspaceService');
$availableWorkspaces = $wsService->getAvailableWorkspaces();
Updated by Gerrit Code Review over 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30962
Updated by Wouter Wolters over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset b99a67c2fc5b5c2122f42f6fadc997e07282c91c.
Updated by Gerrit Code Review over 10 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32562
Updated by Wouter Wolters over 10 years ago
- Status changed from Under Review to Resolved
Applied in changeset f5255315f23c1ec5e29e6bb37f0f555ae8ecd974.