if (($GLOBALS['cache_instance']->loadCacheFile('earning')) && ($GLOBALS['cache_instance']->extensionVersionMatches('earning'))) {
// Load cache
$GLOBALS['cache_array']['earning'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif (isHtmlOutputMode()) {
+} elseif ((isHtmlOutputMode()) && (isExtensionInstalled('earning'))) {
// Create cache file
$GLOBALS['cache_instance']->init();