CodeIgniter Forums
SVN 1.7 Profiler error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: SVN 1.7 Profiler error (/showthread.php?tid=11800)

Pages: 1 2


SVN 1.7 Profiler error - El Forum - 09-23-2008

[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


SVN 1.7 Profiler error - El Forum - 09-24-2008

[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;    
    }



SVN 1.7 Profiler error - El Forum - 09-24-2008

[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.


SVN 1.7 Profiler error - El Forum - 09-24-2008

[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. ;-)


SVN 1.7 Profiler error - El Forum - 09-24-2008

[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.


SVN 1.7 Profiler error - El Forum - 10-01-2008

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



SVN 1.7 Profiler error - El Forum - 10-01-2008

[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!


SVN 1.7 Profiler error - El Forum - 10-17-2008

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


SVN 1.7 Profiler error - El Forum - 10-17-2008

[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 !


SVN 1.7 Profiler error - El Forum - 10-18-2008

[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 ;-)