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