This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixing joomla/joomla-platform#1279

  • Loading branch information...
dongilbert committed Mar 16, 2013
1 parent c490fcd commit 1a3f37f0f2aaf2ecd203812f8aabec8bfe341dd4
Showing with 8 additions and 2 deletions.
  1. +8 −2 libraries/joomla/registry/registry.php
@@ -335,8 +335,14 @@ public function set($path, $value)
{
$result = null;
- // Explode the registry path into an array
- if ($nodes = explode('.', $path))
+ /**
+ * Explode the registry path into an array and remove empty
+ * nodes caused by passing in double dotted strings. ex: joomla..test.
+ * Finally, re-key the array so it is sequential.
+ */
+ $nodes = array_values(array_filter(explode('.', $path), 'strlen'));
+
+ if ($nodes)
{
// Initialize the current node to be the registry root.
$node = $this->data;

0 comments on commit 1a3f37f

Please sign in to comment.