Skip to content

Bug: $bgfile used instead of $objfile in ICON writability check in weathermap_repair_maps() #212

@somethingwithproof

Description

@somethingwithproof

Summary

In lib/poller-common.php, weathermap_repair_maps() has a copy-paste error in the ICON relocation block:

if ($dirgood && file_exists($mydir . $objfile)) {
    // ...
    if (is_writable($mydir . $bgfile)) {   // BUG: $bgfile is from the BACKGROUND block

$bgfile is the loop variable from the outer BACKGROUND processing section, not the ICON being relocated. If the last BACKGROUND file processed was not writable, every ICON relocation silently fails regardless of the actual ICON file's permissions.

Fix

Change $bgfile to $objfile in the ICON writability check.

Priority

Silent failure. Queue for Friday.

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