Welcome Guest, Not a member yet? Register   Sign In
Controller called twice
#2

[eluser]OverZealous[/eluser]
Try putting this in your function:
Code:
$debug = debug_backtrace();
        echo "\n<pre>STACK TRACE:\n";
        $counter = 0;
        foreach($debug as $d) {
            // skip the first line which is this method
            if($counter > 0) {
                if($counter < 10) {
                    $counter = ' '.$counter;
                }
                echo "$counter: ";
                if(isset($d['class'])) {
                    echo $d['class'] . '.';
                }
                echo $d['function'].'()';
                
                if(isset($d['file'])) {
                    echo ' - '.$d['file'] . ': ' . $d['line'];
                }
                echo "<br/>\n";
            }
            $counter++;
        }
        echo "</pre>\n";

It's a bit of stacktrace-like code that will help you figure out what called the current PHP function.


Messages In This Thread
Controller called twice - by El Forum - 09-17-2009, 03:55 PM
Controller called twice - by El Forum - 09-17-2009, 04:01 PM
Controller called twice - by El Forum - 09-17-2009, 04:07 PM
Controller called twice - by El Forum - 09-17-2009, 04:14 PM
Controller called twice - by El Forum - 09-17-2009, 04:22 PM
Controller called twice - by El Forum - 09-17-2009, 04:27 PM
Controller called twice - by El Forum - 09-17-2009, 05:29 PM
Controller called twice - by El Forum - 09-17-2009, 05:33 PM
Controller called twice - by El Forum - 09-17-2009, 05:43 PM
Controller called twice - by El Forum - 09-18-2009, 01:51 AM
Controller called twice - by El Forum - 10-03-2010, 09:24 AM
Controller called twice - by El Forum - 10-03-2010, 10:11 AM
Controller called twice - by El Forum - 10-26-2010, 10:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB