Skip to content

Comments

N°8540 - Maintenance mode#809

Closed
eespie wants to merge 2 commits intosupport/3.2from
issue/8540_Maintenance_mode
Closed

N°8540 - Maintenance mode#809
eespie wants to merge 2 commits intosupport/3.2from
issue/8540_Maintenance_mode

Conversation

@eespie
Copy link
Member

@eespie eespie commented Feb 18, 2026

Base information

https://support.combodo.com/pages/UI.php?operation=details&class=Bug&id=8540
Bug fix

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested all changes I made on an iTop instance
  • I have added a unit test, otherwise I have explained why I couldn't
  • Is the PR clear and detailed enough so anyone can understand digging in the code?

Checklist of things to do before PR is ready to merge

  • ...
  • ...
  • ...

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 51 to 64
if (!isset($GLOBALS['bBypassAutoload']) || $GLOBALS['bBypassAutoload'] == false) {
require_once APPROOT.'/lib/autoload.php';
$oKPI = new ExecutionKPI();
Session::Start();
$oKPI->ComputeAndReport('Session Start');

// Now bBypassMaintenance mode is set in the session rather than the request params
$bBypassMaintenance = Session::Get('bBypassMaintenance', false);
}

//
// Maintenance mode
//

// Use 'maintenance' parameter to bypass maintenance mode
if (!isset($bBypassMaintenance)) {
$bBypassMaintenance = isset($_REQUEST['maintenance']) ? boolval($_REQUEST['maintenance']) : false;
}

if (file_exists(MAINTENANCE_MODE_FILE) && !$bBypassMaintenance) {
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential undefined variable issue: If $GLOBALS['bBypassAutoload'] is true, $bBypassMaintenance will not be defined when it's used on line 64. The code that sets $bBypassMaintenance (line 58) is inside the if block that checks bBypassAutoload.

Consider initializing $bBypassMaintenance = false before the if block on line 51, or checking if it's defined before using it on line 64. This would prevent a potential "undefined variable" notice if bBypassAutoload is true.

Copilot uses AI. Check for mistakes.
@Molkobain Molkobain added this to the 3.2.3 milestone Feb 18, 2026
@eespie eespie closed this Feb 24, 2026
@eespie eespie deleted the issue/8540_Maintenance_mode branch February 24, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Work made by Combodo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants