Skip to content

Commit

Permalink
Merge pull request #309 from RyujiAMANO/fix/create-debugger-problem
Browse files Browse the repository at this point in the history
fix: Fixed problem with debugger not setting up properly
  • Loading branch information
gigamaster authored Nov 15, 2024
2 parents ec7839c + 364d112 commit 1ee8a43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion html/modules/legacy/class/Legacy_Debugger.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Legacy_DebuggerManager
* @param $instance
* @param $debug_mode
*/
public function createInstance(&$instance, $debug_mode)
public static function createInstance(&$instance, $debug_mode)
{
if (is_object($instance)) {
return;
Expand Down
11 changes: 8 additions & 3 deletions html/modules/legacy/kernel/Legacy_Controller.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ class Legacy_Controller extends XCube_Controller
*/
public $mSetupDebugger = null;

/**
* @var Legacy_AbstractDebugger
*/
public $mDebugger;

/**
* @public
* @var XCube_Delegate
Expand All @@ -107,8 +112,6 @@ class Legacy_Controller extends XCube_Controller
* @var XoopsLogger
*/
public $mLogger = null;
//@todo added
//public $mDebugger = null;

public function __construct()
{
Expand Down Expand Up @@ -771,7 +774,9 @@ public function _setupScript()
*/
public function _setupDebugger()
{
error_reporting(0);
// Commented out because suppressing errors here will not result in an error if the debugger setup fails.
// If the debugger setup succeeds, error_reporting is set to the value corresponding to the debug mode.
// error_reporting(0);

$debug_mode = $this->mRoot->mContext->mXoopsConfig['debug_mode'];
if (defined('XC_FORCE_DEBUG_PHP')) {
Expand Down

0 comments on commit 1ee8a43

Please sign in to comment.