Project

General

Profile

Actions

Bug #25013

closed

Registry does not return existing entries

Added by Thomas Deinhamer about 13 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-02-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

25013_4-5.diff (596 Bytes) 25013_4-5.diff Helmut Hummel, 2011-08-12 15:04

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #28836: t3lib_Registry: get after inital set does not workClosed2011-08-08

Actions
Actions #1

Updated by Thomas Deinhamer about 13 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());

Actions #2

Updated by Oliver Hader about 13 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!

Actions #3

Updated by Helmut Hummel over 12 years ago

Actions #4

Updated by Alexander Opitz over 9 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)?

Actions #5

Updated by Benni Mack over 9 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.

Actions

Also available in: Atom PDF