Project

General

Profile

Actions

Bug #57332

closed

Call to a member function isPackageActive() on a non-object in .../typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php on line 101

Added by Frank Gerards almost 11 years ago. Updated 3 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-03-26
Due date:
% Done:

0%

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

Description

Hi,

I tried to migrate a TYPO3 6.1.latest project to 6.2.0 (exchanged the 6.1 core to 6.2, clearing all previously files in typo3_src).
After I try to access the frontend/backend, I get redirected to "typo3/sysext/install/Start/Install.php" and am presented with the following
PHP error:

Fatal error: Call to a member function isPackageActive() on a non-object in <docroot>/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php on line 101

By digging into the core I found a class inheritance bug, as an object, where the object with the isPackageActive() method is included via a dependency injection into another class, but the initation of the injected object is wrong, meaning the class variable isnt initiated i.e. in the constructor or another
init-method.
It only occurs if you try to migrate a given project from 6.1.latest to 6.2, not if you do a 6.2 from scratch.

Actions #1

Updated by Frank Gerards almost 11 years ago

PLz close the issue, we found the bug:
We had a "require_once GeneralUtility::getFileAbsFileName( '.../Classes/Cache/Backend/SimpleFileBackend.php');" call in AdditionalConfiguration.php,
which triggered the error. It seems, that getFileAbsFileName triggers the isLoaded at a too early point, I guess require_once should be removed throught the
code , right ?

Actions #2

Updated by Georg Ringer almost 11 years ago

  • Status changed from New to Closed
Actions #3

Updated by Stefan Froemken 3 months ago

We just stumbled over the same issue in TYPO3 8.7.

Following Backtrace:
  • Customer runs page with PHP 7.4
  • In vendor/typo3/phar-stream-wrapper:497 there is a $file{0}, but curly braces are deprecated since PHP 7.4
  • That's why TYPO3 error handler will be called
  • A TSmessage for TimeTracker will be called
  • For that message TYPO3 will add an info-icon
  • That info icon is of Type SVG
  • SvgProvider will now try to render the icon
  • The icon path starts with EXT:core/
  • GeneralUtility:getPathEnvAbsWhatEver calls ExtensionManagerUtilits::isLoaded('core')
  • At that point self::$packageManager is NULL

The problem is, that the wrong error message about missing $packageManager was protocolled.

I have added a debugging to isLoaded():

if (self::$packageManager === null) {
    \TYPO3\CMS\Core\Utility\DebugUtility::debug([
        'message' => 'PackageManager is null!',
        'extkey' => $key,
        'backtrace' => debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS),
    ]);
}

Which gives me a hint to invest in ErrorHandler much deeper.

In "renderError" I also add some debugging on $errorFile, $errorLine and $errorMessage which directs me to the problem in StreamWrapper file.

Reducing the PHP version to 7.3 helps.

Stefan

Actions

Also available in: Atom PDF