Bug #18480

PHP5ize class.t3lib_extMgm.php

Added by Kasper Ligaard almost 13 years ago. Updated over 10 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


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)


public-static-t3lib_extMgm.patch (11.7 KB) public-static-t3lib_extMgm.patch Administrator Admin, 2008-03-19 11:26
public-static-t3lib_extMgm-rev2.patch (23.6 KB) public-static-t3lib_extMgm-rev2.patch Administrator Admin, 2008-03-19 14:11
public-static-t3lib_extMgm-rev3.patch (36 KB) public-static-t3lib_extMgm-rev3.patch Administrator Admin, 2008-03-19 19:36
public-static-t3lib_extMgm-rev3-1.patch (36 KB) public-static-t3lib_extMgm-rev3-1.patch Administrator Admin, 2008-03-19 20:34

Related issues

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


Updated by Kasper Ligaard almost 13 years ago

New patch attached, that adds 'final' to class and replaces tabs with a space between function declarations and '{'.

Note: A related issue is found in #18482.


Updated by Kasper Ligaard almost 13 years ago

Revision 3 of the patch is improved along coding guidelines:
- Spaces around =
- Spaces after comma


Updated by Kasper Ligaard almost 13 years ago

Issue #18483 is similar to this and to #18483.


Updated by Kasper Ligaard almost 13 years ago

Fixed patch uploaded.

Also available in: Atom PDF