Skip to content
Permalink
Browse files

Reformatting default values.

Fixing issue with undefined variables caused by missing extract().
  • Loading branch information...
markstory committed Oct 23, 2010
1 parent a081188 commit 1b5cc91262236bb75daa9c344d70084a1630efec
Showing with 12 additions and 5 deletions.
  1. +12 −5 cake/console/shells/tasks/db_config.php
@@ -30,20 +30,26 @@ class DbConfigTask extends Shell {
* path to CONFIG directory
*
* @var string
* @access public
*/
public $path = null;
/**
* Default configuration settings to use
*
* @var array
* @access private
*/
protected $_defaultConfig = array(
'name' => 'default', 'driver'=> 'mysql', 'persistent'=> 'false', 'host'=> 'localhost',
'login'=> 'root', 'password'=> 'password', 'database'=> 'project_name',
'schema'=> null, 'prefix'=> null, 'encoding' => null, 'port' => null
'name' => 'default',
'driver'=> 'mysql',
'persistent'=> 'false',
'host'=> 'localhost',
'login'=> 'root',
'password'=> 'password',
'database'=> 'project_name',
'schema'=> null,
'prefix'=> null,
'encoding' => null,
'port' => null
);
/**
@@ -306,6 +312,7 @@ public function bake($configs) {
foreach ($configs as $config) {
$config = array_merge($this->_defaultConfig, $config);
extract($config);
$out .= "\tpublic \${$name} = array(\n";
$out .= "\t\t'driver' => '{$driver}',\n";

0 comments on commit 1b5cc91

Please sign in to comment.
You can’t perform that action at this time.