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:
@@ -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'])) {
|
||||
|
Reference in New Issue
Block a user