Skip to content

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

@somethingwithproof

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.

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