Skip to content

Undefined array key "layout" (MapService.php) #71

@prolibre

Description

@prolibre

Nextcloud 31.0.0
Gpxpod ♥ (v7.0.4)

I had in my logs multiple :

{"reqId":"BbhxnCOQwB5LigGFm5uF","level":3,"time":"2025-03-12T15:13:46+00:00","remoteAddr":"IP","user":"USER","app":"PHP","method":"GET","url":"/index.php/apps/gpxpod/maptiler/maps/openstreetmap/style.json?key=KEY","message":"Undefined array key \"layout\" at /DIR/nextcloud/apps/gpxpod/lib/Service/MapService.php#166","userAgent":"USER AGENT","version":"31.0.0.18","data":{"app":"PHP"}}

I've corrected this by adding an isset on line 166 of MapService.php :
if (isset($layer['layout']) && is_array($layer['layout']) && empty($layer['layout'])) {

Have a nice day !

Anthony

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions