1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 21:58:10 +02:00

DibiConnection: fixed processing of profiler configuration

This commit is contained in:
David Grudl
2010-08-03 21:29:12 +02:00
parent 6b166afffb
commit 204c4cdbd7

View File

@@ -95,10 +95,11 @@ class DibiConnection extends DibiObject
// profiler
$profilerCfg = & $config['profiler'];
if (is_numeric($profilerCfg) || is_bool($profilerCfg)) { // back compatibility
$profilerCfg = array('run' => (bool) $profilerCfg);
} elseif (is_string($profilerCfg)) {
$profilerCfg = array('run' => TRUE, 'class' => $profilerCfg);
if (is_scalar($profilerCfg)) { // back compatibility
$profilerCfg = array(
'run' => (bool) $profilerCfg,
'class' => strlen($profilerCfg) > 1 ? $profilerCfg : NULL,
);
}
if (!empty($profilerCfg['run'])) {