Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JRegistryFormatINI::stringToObject() returns empty object #267

Closed
eaxs opened this issue Jul 10, 2012 · 4 comments
Closed

JRegistryFormatINI::stringToObject() returns empty object #267

eaxs opened this issue Jul 10, 2012 · 4 comments

Comments

@eaxs
Copy link
Contributor

eaxs commented Jul 10, 2012

I think there's a simple error in: "/libraries/joomla/registry/format/ini.php" which caused the method to always return an empty object:

// Validate the key.
if (preg_match('/[^A-Z0-9_]/i', $key))
{
    // Maybe throw exception?
    continue;
}

Shouldn't it be "not" (!):

if (!preg_match('/[^A-Z0-9_]/i', $key))

To reproduce:

$params = JRegistry::getInstance('test');
$params->loadFile('/path/to/ini_file', 'INI');
@phproberto
Copy link
Contributor

I think you are true. Sent a pull request to the platform repo:

joomla/joomla-platform#1415

If approved I'll send it also to the joomla-cms

@eaxs
Copy link
Contributor Author

eaxs commented Jul 28, 2012

Cool, thanks!

@nicksavov
Copy link
Contributor

Hi guys,

What's the status on this one? With the new reabsorption of the platform by the CMS, we can apply this directly to the CMS, if needed.

@brianteeman
Copy link
Contributor

Thanks for reporting this. At this time we are only using github as the place to submit code fixes so I am closing the report here. The actual reporting of issues and testing fixes is still taking place on Joomlacode.

As it has been some time since you opened this issue can you please confirm that it is still valid with the current Master or Joomla 3.2 beta.

If it is still valid please can you open an item on the Joomlacode tracker in the appropriate area.

CMS Bug Reports: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemBrowse&tracker_id=8103

CMS Feature Requests: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemBrowse&tracker_id=8549

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants