#53182t3lib_Registry returns default value instead of database value if set() called for get() for same namespace.
Description
t3lib_Registry is broken:
When calling t3lib_Registry::get(), all entries for the given namespace are loaded ONLY if no value for this namespace has been set() before in the same run.
This means that if we call t3lib_Registry::set() before the first call to t3lib_Registry::get() within a script, all following t3lib_Registry::get() calls for this namespace will return the given default value, instead of loading the correct value from the database.
Reason:
public function get($namespace, $key, $defaultValue = null) {
if (!isset($this->entries[$namespace])) {
$this->loadEntriesByNamespace($namespace);
}
[…]
}
The isset() returns true if a value in the same namespace has been set() before. Setting the value does not load all other entries of the namespace, though.
This appears to affect all versions having t3lib_Registry.