fix(rrd): drop duplicate --slope-mode emission#7336
Open
somethingwithproof wants to merge 1 commit into
Open
Conversation
- forward-ports the Cacti#7183 hunk from 1.2.x; the switch case already emits it Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR forward-ports the develop-branch fix to prevent RRDtool’s --slope-mode option from being appended twice during graph command construction in Cacti’s RRD graph rendering path.
Changes:
- Removed the redundant standalone
--slope-modeappend block inrrd_function_process_graph_options()(leaving the existing per-option switch emission as the single source). - Added a regression unit test to ensure
lib/rrd.phpcontains only one--slope-modeemission site.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lib/rrd.php | Drops the duplicate standalone --slope-mode append so slope mode is emitted once via the existing switch case. |
| tests/Unit/RrdSlopeModeSingleEmissionTest.php | Adds a regression test guarding against reintroducing duplicate --slope-mode emission in lib/rrd.php. |
somethingwithproof
requested review from
TheWitness
and removed request for
cigamit
July 21, 2026 00:47
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.
--slope-modeis emitted twice: once in the per-option switch and again in a standalone block gated on the same$graph['slope_mode'] == 'on'condition. #7183 removed the standalone block on 1.2.x (commit 3a8ed7a) but the fix never got forward-ported to develop.Forward-ports that removal. Confirmed the switch case fires for every graph the standalone block did (same
$graphrow, no path where one runs without the other).Base: develop.
php -lclean.