Skip to content

Bug: template import error logging uses wrong variable in error loop #757

Description

@somethingwithproof

Summary

template_import() logs import errors using $message inside the errors loop, but loop variable is $error.

Current code (simplified):

foreach ($return_data['errors'] as $error) {
    cacti_log('... ' . $message, ...);
}

Impact

  • Error logs can show stale/incorrect messages from another loop.
  • Troubleshooting import failures becomes misleading.

Location

  • thold_templates.php, template_import() function.

Expected

Log $error within the error loop so log output matches the actual error entry.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions