mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Reformatting default values.
Fixing issue with undefined variables caused by missing extract().
This commit is contained in:
parent
a081188aab
commit
1b5cc91262
1 changed files with 12 additions and 5 deletions
|
@ -30,7 +30,6 @@ class DbConfigTask extends Shell {
|
|||
* path to CONFIG directory
|
||||
*
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
public $path = null;
|
||||
|
||||
|
@ -38,12 +37,19 @@ class DbConfigTask extends Shell {
|
|||
* 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 @@ class DbConfigTask extends Shell {
|
|||
|
||||
foreach ($configs as $config) {
|
||||
$config = array_merge($this->_defaultConfig, $config);
|
||||
extract($config);
|
||||
|
||||
$out .= "\tpublic \${$name} = array(\n";
|
||||
$out .= "\t\t'driver' => '{$driver}',\n";
|
||||
|
|
Loading…
Reference in a new issue