1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 13:47:33 +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 // profiler
$profilerCfg = & $config['profiler']; $profilerCfg = & $config['profiler'];
if (is_numeric($profilerCfg) || is_bool($profilerCfg)) { // back compatibility if (is_scalar($profilerCfg)) { // back compatibility
$profilerCfg = array('run' => (bool) $profilerCfg); $profilerCfg = array(
} elseif (is_string($profilerCfg)) { 'run' => (bool) $profilerCfg,
$profilerCfg = array('run' => TRUE, 'class' => $profilerCfg); 'class' => strlen($profilerCfg) > 1 ? $profilerCfg : NULL,
);
} }
if (!empty($profilerCfg['run'])) { if (!empty($profilerCfg['run'])) {