phalcon-debug-widget icon indicating copy to clipboard operation
phalcon-debug-widget copied to clipboard

Multiple options in database configuration not supported

Open siciarek opened this issue 10 years ago • 3 comments

$di->set('db', function () use ($di) { return new \Phalcon\Db\Adapter\Pdo\Mysql(array( 'host' => $di->get('config')->database->host, 'username' => $di->get('config')->database->username, 'password' => $di->get('config')->database->password, 'dbname' => $di->get('config')->database->dbname, 'charset' => $di->get('config')->database->charset, 'options' => array( PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES "utf8"', PDO::ATTR_CASE => PDO::CASE_LOWER ) )); });

here is my database config

When debug panel is opened, array to string convertion error occurs.

siciarek avatar Jul 26 '14 12:07 siciarek

hmm... I'll have to check this out. I've made some changes recently that I need to push. I decided to leave the database connection details off by default since its more of a security liability....

Does it give you a line for the error? Or which file anyway?

jymboche avatar Jul 28 '14 17:07 jymboche

It's a really simple fix. In the database layout template, the last loop that iterates through options. Just needs a check if_array.... Print_r instead of echo or something.

nazwa avatar Jul 28 '14 18:07 nazwa

Just in the view, when I click in number ogłoszenia queries 28 lip 2014 19:10 "jymboche" [email protected] napisał(a):

hmm... I'll have to check this out. I've made some changes recently that I need to push. I decided to leave the database connection details off by default since its more of a security liability....

Does it give you a line for the error? Or which file anyway?

— Reply to this email directly or view it on GitHub https://github.com/jymboche/phalcon-debug-widget/issues/4#issuecomment-50367615 .

siciarek avatar Jul 28 '14 18:07 siciarek