Ozzy47
Well-known member
In my listener file I have this. I am listening to the visitor_setup.
Which enables debug mode in the front end and development mode in the back end.
Now when you enable debug mode from the
When you enable debug mode with my addon you get this.
Anyone have a clue why the results are different?
PHP:
<?php
namespace OzzModz\DebugDevelopment;
class Listener
{
public static function appSetup(\XF\Entity\User &$visitor)
{
// Get options
$options = \XF::options();
// Get variables
$opt1 = $options->ozzmodzDebug;
$opt2 = $options->ozzmodzDevelopment;
$groups = $options->ozzmodzDebugDevGroups;
// Enable debug mode
if ($opt1 && $visitor->isMemberOf($groups))
{
\XF::$debugMode = true;
}
// Enable development mode
if ($opt2 && $visitor->isMemberOf($groups))
{
\XF::$developmentMode = true;
}
// Show errors
if ($opt1 || $opt2 && $visitor->isMemberOf($groups))
{
@ini_set('display_errors', true);
}
}
}
Now when you enable debug mode from the
src/config.php
file and you click on the page render time, you get something like this:When you enable debug mode with my addon you get this.
Anyone have a clue why the results are different?