Commit 07de2dee authored by Carsten  Rose's avatar Carsten Rose
Browse files

Store.php: phpunit: access to TYPO3_LOADED_EXT reports undefined index - wrapped with isset()

parent 9119931f
......@@ -179,7 +179,8 @@ class Store {
// If we are called through AJAX API (e.g. api/save.php), there is no TYPO3 environment.
if (isset($_SERVER['SCRIPT_FILENAME'])) {
$pos = strpos($_SERVER['SCRIPT_FILENAME'], $relExtDir);
if ($pos === false) {
if ($pos === false && isset($GLOBALS['TYPO3_LOADED_EXT'][EXT_KEY]['ext_localconf.php'])) {
// probably: index.php - THERE should be a TYPO3 environment.
$config[SYSTEM_PATH_EXT] = dirname($GLOBALS['TYPO3_LOADED_EXT'][EXT_KEY]['ext_localconf.php']);
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment