Repository navigation
N°10179 - MTP/upgrade not working - #1101
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Applying escapeshellarg() to an already quoted php_path makes the quotes part of the executable name on Unix, breaking previously supported values; preserve executable handling while retaining script-path escaping.
1 open issue
What changed in this PR
This PR addresses setup compatibility-check failures when iTop is installed in a Windows directory containing spaces.
Changes:
- Escapes the PHP executable and model-reflection script path when constructing the background command.
- Retains escaping of the environment argument.
| File | Description |
|---|---|
setup/feature_removal/ModelReflectionSerializer.php |
Updates shell argument escaping for the model-reflection command used during setup. |
Review effort: Balanced
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Molkobain
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Base information
Symptom (bug) / Objective (enhancement)
When installing or upgrading iTop 3.3.0 in a directory in windows whose path contains spaces, the compatibility check fails with the following error: Data consistency check failed
Reproduction procedure (bug)
Cause (bug)
The issue is caused by an improperly escaped file path in a background command executed using PHP's exec() function.
If the path contains a space and is not properly quoted, the command interpreter treats the path as separate arguments.
Proposed solution (bug and enhancement)
Use PHP's escapeshellarg() function to properly escape the script path before passing it to the command executed through exec().
Checklist before requesting a review