Permalink
Browse files

Merge pull request #1550 from pasamio/jregistry-def

Update JRegistry::def to support not string defaults.
  • Loading branch information...
2 parents aed408f + 38dba71 commit d50fe0744fbdcc6ab24a1bedb30bea04a4ef6ee0 @LouisLandry LouisLandry committed Sep 26, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 libraries/joomla/registry/registry.php
@@ -99,15 +99,15 @@ public function jsonSerialize()
* Sets a default value if not already assigned.
*
* @param string $key The name of the parameter.
- * @param string $default An optional value for the parameter.
+ * @param mixed $default An optional value for the parameter.
*
- * @return string The value set, or the default if the value was not previously set (or null).
+ * @return mixed The value set, or the default if the value was not previously set (or null).
*
* @since 11.1
*/
public function def($key, $default = '')
{
- $value = $this->get($key, (string) $default);
+ $value = $this->get($key, $default);
$this->set($key, $value);
return $value;
}

0 comments on commit d50fe07

Please sign in to comment.