Welcome Guest, Not a member yet? Register   Sign In
SVN 1.7 Profiler error
#1

[eluser]beemr[/eluser]
Anyone else getting this with the 1.7 SVN?

Fatal error: Call to a member function fetch_class() on a non-object in C:\xampp\htdocs\sandbox\system\libraries\Profiler.php on line 298
#2

[eluser]beemr[/eluser]
Wow. Am I the only one?

Anyhoo. Line 298 calls for $this->CI->router but the router class can't be called like a normal CI class.

So, the new controller profiler function needs an instance of the router class. Normally, this is $RTR. Here's the new function:
Code:
function _compile_controller_info()
    {    
        $RTR =& load_class('Router'); //grab an instance of Router;

        $output  = "\n\n";
        $output .= '<fieldset style="border:1px solid #995300;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
        $output .= "\n";
        $output .= '<legend style="color:#995300;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_controller_info').'&nbsp;&nbsp;</legend>';
        $output .= "\n";

        // fetch_class() and fetch_method() are now called from $RTR instead of $this->CI->router;
        $output .= "<div style='color:#995300;font-weight:normal;padding:4px 0 4px 0'>".$RTR->fetch_class()."/".$RTR->fetch_method()."</div>";                

        
        $output .= "</fieldset>";

        return $output;    
    }
#3

[eluser]johnwbaxter[/eluser]
How many people do you think actually work from the latest in svn?

The above started out as a challenge but now it's a serious question, i wonder how many people do.

Anyway, you should put this in the bugs section.
#4

[eluser]beemr[/eluser]
Right. I did end up putting it there, but I wanted to see if others were replicating the problem before reporting.

I thought this would be a good area to check with, since there's so much activity here testing the new form_validation for SVN 1.7.

In this case, I felt confident enough that it was a simple bug that I went ahead and reported it even though this topic drew no interest.

Thanks for not leaving my post hanging, though. ;-)
#5

[eluser]johnwbaxter[/eluser]
Quote:Anyway, you should put this in the bugs section.

I meant it as not, you know, "you put it in the wrong forum dumbass" way.
#6

[eluser]Unknown[/eluser]
Yes, i'am got it too :long:
Code:
Message: Undefined property: my_controller::$router
Filename: libraries/Profiler.php
Line Number: 298
#7

[eluser]beemr[/eluser]
The fix above should solve it for you until it is officially cleared.

You could also just comment out line 298 and skip listing controller/method in your profiler.

Thanks for posting!
#8

[eluser]beemr[/eluser]
Fix is now in SVN. Router was added to the CI Super Object.
#9

[eluser]sikkle[/eluser]
all those using svn have the same issue, but like that been said it's already fixed.

junior usually not use SVN, so that why most of the senior folks who see this error just fix it by hand and keep workin Wink

good luck !
#10

[eluser]beemr[/eluser]
Actually, I would think that the senior folks ought to fix them, then post the bug with its fix to the bug tracker, then keep workin ;-)




Theme © iAndrew 2016 - Forum software by © MyBB