Permalink
Browse files

Fixed URI Parse Merge with Options in MySQL Class (currently inside c…

…onstructor)
  • Loading branch information...
1 parent 3a6245f commit 64ef69f5f2c00bad3964f8324f3b5323f674ca42 @devlinjunker devlinjunker committed Mar 11, 2013
Showing with 16 additions and 1 deletion.
  1. +16 −1 library/SimplePie/Cache/MySQL.php
@@ -96,7 +96,22 @@ public function __construct($location, $name, $type)
'prefix' => '',
),
);
- $this->options = array_merge($this->options, SimplePie_Cache::parse_URL($location));
+ $parsed = SimplePie_Cache::parse_URL($location);
+
+ foreach( $parsed as $key => $value )
+ {
+ if( is_array($value) )
+ {
+ foreach( $value as $array_key => $array_value )
+ {
+ $this->options[$key][$array_key] = $array_value;
+ }
+ }
+ else
+ {
+ $this->options[$key] = $value;
+ }
+ }
// Path is prefixed with a "/"
$this->options['dbname'] = substr($this->options['path'], 1);

0 comments on commit 64ef69f

Please sign in to comment.