Bug #25013
closedRegistry does not return existing entries
0%
Description
The registry will not load the existing entries for a namespace if the set() metod is called before any call of the get() method. In other words, if the set() method is called first, the get() method is not working correctly as it won't reload the already persisted entries from the database.
Inside the get method the following check is done:
if (!isset($this->entries[$namespace])) {
$this->loadEntriesByNamespace($namespace);
}
But if the set() method is called before, it will set a key inside the $entries array, and therefor the get() method won't load the namespace entries from the db.
Maybe the bug is still in 4.5 and trunk too.
(issue imported from #M17556)
Files
Updated by Thomas Deinhamer almost 14 years ago
To avoid the problem for now, someone must call the get() method first, either with a real key or if no data is available, with non-existent or random key: $this->registry->get('tx_extension', time());
Updated by Oliver Hader almost 14 years ago
Can you please provide some unit test for this case? Thus, it's easier to ensure what is wrong and maybe which other cases are missing. Thanks in advance!
Updated by Helmut Hummel over 13 years ago
- File 25013_4-5.diff 25013_4-5.diff added
- Target version deleted (
0)
Updated by Alexander Opitz almost 10 years ago
- Status changed from New to Needs Feedback
- Is Regression set to No
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.2.7)?
Updated by Benni Mack almost 10 years ago
- Status changed from Needs Feedback to Closed
looking at the current PHP code the problem is solved. If this is not the case for you, please let us know.