Project

General

Profile

Actions

Bug #51420

closed

non static method getAvailableWorkspaces()

Added by Tomasz Krawczyk over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Code Cleanup
Target version:
-
Start date:
2013-08-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.4
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #61312: calling non static method staticallyClosed2014-09-02

Actions
Actions #1

Updated by Jan Schreier almost 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();

Actions #2

Updated by Gerrit Code Review almost 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

Actions #3

Updated by Wouter Wolters almost 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #4

Updated by Gerrit Code Review over 9 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

Actions #5

Updated by Wouter Wolters over 9 years ago

  • Status changed from Under Review to Resolved
Actions #6

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF