Skip to content

fix(rrd): drop duplicate --slope-mode emission#7336

Open
somethingwithproof wants to merge 1 commit into
Cacti:developfrom
somethingwithproof:fix/slope-mode-duplicate
Open

fix(rrd): drop duplicate --slope-mode emission#7336
somethingwithproof wants to merge 1 commit into
Cacti:developfrom
somethingwithproof:fix/slope-mode-duplicate

Conversation

@somethingwithproof

Copy link
Copy Markdown
Contributor

--slope-mode is 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 $graph row, no path where one runs without the other).

Base: develop. php -l clean.

- forward-ports the Cacti#7183 hunk from 1.2.x; the switch case already emits it

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Copilot AI review requested due to automatic review settings July 17, 2026 19:14
@somethingwithproof
somethingwithproof requested a review from a team as a code owner July 17, 2026 19:14
@somethingwithproof
somethingwithproof requested review from cigamit and removed request for a team July 17, 2026 19:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-mode append block in rrd_function_process_graph_options() (leaving the existing per-option switch emission as the single source).
  • Added a regression unit test to ensure lib/rrd.php contains only one --slope-mode emission 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 somethingwithproof added the develop Bug in the development branch label Jul 18, 2026
@somethingwithproof
somethingwithproof requested review from TheWitness and removed request for cigamit July 21, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

develop Bug in the development branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants