Skip to content

Commit

Permalink
Simplified checks.
Browse files Browse the repository at this point in the history
Changed input parameter comment to generic object.
  • Loading branch information
gpongelli committed Jul 21, 2012
1 parent f37c04e commit a24d16d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libraries/joomla/database/driver.php
Expand Up @@ -421,9 +421,9 @@ abstract public function connected();
* Create a new database using information from $options object, obtaining query string
* from protected member.
*
* @param JObject $options JObject coming from CMS' "initialise" function to pass user
* and database name to database driver.
* @param boolean $utf True if the database supports the UTF-8 character set.
* @param stdClass $options Object used to pass user and database name to database driver.
* This object must have "db_name" and "db_user" set.
* @param boolean $utf True if the database supports the UTF-8 character set.
*
* @return string The query that creates database
*
Expand All @@ -436,11 +436,11 @@ public function createDatabase($options, $utf = true)
{
throw new RuntimeException('$options object must not be null.');
}
elseif (!isset($options->db_name) || empty($options->db_name))
elseif (empty($options->db_name))
{
throw new RuntimeException('$options object must have db_name set.');
}
elseif (!isset($options->db_user) || empty($options->db_user))
elseif (empty($options->db_user))
{
throw new RuntimeException('$options object must have db_user set.');
}
Expand Down

0 comments on commit a24d16d

Please sign in to comment.