Project

General

Profile

Actions

Bug #18480

closed

PHP5ize class.t3lib_extMgm.php

Added by Kasper Ligaard about 16 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2008-03-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

t3lib_extMgm states in it's documentation: "This class is never instantiated, rather the methods inside is called as functions like t3lib_extMgm::isLoaded('my_extension');"

Thus I propose to PHP5ize all methods by marking them 'public static'. This will remove E_STRICT warnings such as this one:

Strict: Non-static method t3lib_extMgm::extPath() should not be called statically, assuming $this from incompatible context

I have tested on my own machine, and things seem to run fine. Furthermore I did a grep for 'new t3lib_extMgm' through Typo3, to see if anyone is instaitiating the class; the search gave no results. Googling for "new t3lib_extMgm" did not find exact matches for that string: Thus it seems to be safe make this change.

Only possible danger might be if some extension instantiates t3lib_extMgm. I find this unlikely, since the documentation states you should not, and I have never seen any examples that instantiates t3lib_extMgm.

Doing the change will ensure us that people calling the class correctly will not be shown an E_STRICT warning, but that people calling the class incorrectly will be told right away.

Note: Typo3 does not currently run with E_STRICT.
(issue imported from #M7903)


Files


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #18482: PHP5ize class.t3lib_extBEfunc.phpClosedMartin Kutschker2008-03-19

Actions
Actions

Also available in: Atom PDF