[eluser]fjamal[/eluser]
Hey Team! Glad to be one of your members...
Can NOT Overload run() in MY_Profiler.php
NOTE:
I tried to overload run() in MY_Profiler.php to dump the output in a log file as:
Code:
function run() {
.
.
.
file_put_contents(***path to the log file***, $output);
return '';
}
PROBLEM:
I get the following error:
Quote:Fatal error: Call to private method CI_Profiler::_compile_session_data() from context 'MY_Profiler' in C:\xampp\htdocs\ci_profandhooks\application\libraries\MY_Profiler.php on line 17
Line 17 refers to:
Code:
$func = "_compile_{$section}";
$output .= $this->{$func}(); --------> line 17
$fields_displayed++;
In the parent class, i found that _compile_session_data() is set as private whereas the other functions
are set as protected.
SOLUTION:
In Profiler.php, i had to set _compile_session_data() to protected instead of private.
I hope this helps...