[eluser]danmontgomery[/eluser]
For some reason enable_profiler() explicitly checks for a bool, you may need to typecast the value.
Code:
$this->output->enable_profiler((bool)$var);
Or, you could always just check the value of $var beforehand.
Code:
if($var) {
$this->output->enable_profiler();
}