[Bug] Undefined array key "HTTP_USER_AGENT" at /var/www/nextcloud/apps/side_menu/lib/AppInfo/Application.php#109 #422

Closed
opened 2025-04-30 07:52:57 +02:00 by j3ffery7 · 1 comment

Environment

  • Custom menu version: 5.0.2
  • Nextcloud version: 31.0.4
  • PHP version: 8.3
  • Web server (Nginx, Apache2): Apache2
  • Web browser and version (Firefox 80, Google Chrome 74, etc): Firefox ``

Configuration

{
  "add-logo-link": true,
  "always-displayed": false,
  "apps-categories-custom": {
    "files": null,
    "dashboard": null,
    "memories": null,
    "music": null,
    "photos": null,
    "analytics": null,
    "appointments": null,
    "calendar": null,
    "contacts": null,
    "deck": null,
    "diary": null,
    "mail": null,
    "notes": null,
    "passwords": null,
    "quicknotes": null,
    "tasks": null,
    "bookmarks": null,
    "cospend": null,
    "forms": null,
    "openregister": null,
    "sharereview": null,
    "activity": null,
    "spreed": null,
    "announcementcenter": null
  },
  "apps-order": [],
  "background-color": "#00537f",
  "background-color-opacity": 100,
  "background-color-to": "#00537f",
  "big-menu": false,
  "big-menu-hidden-apps": [],
  "categories-custom": [],
  "categories-order": [
    "other",
    "customization",
    "dashboard",
    "external_links",
    "files",
    "workflow",
    "games",
    "integration",
    "monitoring",
    "multimedia",
    "office",
    "organization",
    "search",
    "security",
    "social",
    "tools"
  ],
  "categories-order-type": "default",
  "current-app-background-color": "#00496f",
  "dark-mode-background-color": "#00537f",
  "dark-mode-background-color-opacity": 100,
  "dark-mode-background-color-to": "#00537f",
  "dark-mode-current-app-background-color": "#00496f",
  "dark-mode-icon-invert-filter": 0,
  "dark-mode-icon-opacity": 100,
  "dark-mode-loader-color": "#ffffff",
  "dark-mode-opener": "side-menu-opener",
  "dark-mode-text-color": "#ffffff",
  "default-enabled": true,
  "display-logo": true,
  "force": false,
  "icon-invert-filter": 0,
  "icon-opacity": 100,
  "loader-color": "#3386b2",
  "loader-enabled": true,
  "opener": "side-menu-opener",
  "opener-hover": false,
  "opener-only": false,
  "opener-position": "before",
  "show-settings": false,
  "side-with-categories": true,
  "size-icon": "normal",
  "size-text": "normal",
  "target-blank-apps": [],
  "text-color": "#ffffff",
  "top-menu-apps": [],
  "top-menu-mouse-over-hidden-label": 0,
  "top-side-menu-apps": [],
  "use-avatar": false,
  "external-sites-in-top-menu": "0",
  "force-light-icon": "0"
}

Steps to reproduce

It appears in the nextcloud log as you browse nextcloud with the side menu. I did not test other menu configurations.

Observed Results

The error below being repeated every few seconds in the log

Undefined array key "HTTP_USER_AGENT" at /var/www/nextcloud/apps/side_menu/lib/AppInfo/Application.php#109

Expected Results

No error

More informations

I was able to stop the error by changing the following on line 109 of /var/www/nextcloud/apps/side_menu/lib/AppInfo/Application.php

if (strpos($_SERVER['HTTP_USER_AGENT'], 'Nextcloud Desktop Client') !== false) {

changed to

if (strpos($_SERVER['HTTP_USER_AGENT'], 'Nextcloud Desktop Client') !== false) {

Apologies for the formatting, the markdown wasn't working for some reason.

Otherwise terrific nextcloud app! It makes my nextcloud look wonderful. Thank you.

### Environment * Custom menu version: 5.0.2 * Nextcloud version: 31.0.4 * PHP version: 8.3 * Web server (Nginx, Apache2): Apache2 * Web browser and version (Firefox 80, Google Chrome 74, etc): Firefox `` ### Configuration ``` { "add-logo-link": true, "always-displayed": false, "apps-categories-custom": { "files": null, "dashboard": null, "memories": null, "music": null, "photos": null, "analytics": null, "appointments": null, "calendar": null, "contacts": null, "deck": null, "diary": null, "mail": null, "notes": null, "passwords": null, "quicknotes": null, "tasks": null, "bookmarks": null, "cospend": null, "forms": null, "openregister": null, "sharereview": null, "activity": null, "spreed": null, "announcementcenter": null }, "apps-order": [], "background-color": "#00537f", "background-color-opacity": 100, "background-color-to": "#00537f", "big-menu": false, "big-menu-hidden-apps": [], "categories-custom": [], "categories-order": [ "other", "customization", "dashboard", "external_links", "files", "workflow", "games", "integration", "monitoring", "multimedia", "office", "organization", "search", "security", "social", "tools" ], "categories-order-type": "default", "current-app-background-color": "#00496f", "dark-mode-background-color": "#00537f", "dark-mode-background-color-opacity": 100, "dark-mode-background-color-to": "#00537f", "dark-mode-current-app-background-color": "#00496f", "dark-mode-icon-invert-filter": 0, "dark-mode-icon-opacity": 100, "dark-mode-loader-color": "#ffffff", "dark-mode-opener": "side-menu-opener", "dark-mode-text-color": "#ffffff", "default-enabled": true, "display-logo": true, "force": false, "icon-invert-filter": 0, "icon-opacity": 100, "loader-color": "#3386b2", "loader-enabled": true, "opener": "side-menu-opener", "opener-hover": false, "opener-only": false, "opener-position": "before", "show-settings": false, "side-with-categories": true, "size-icon": "normal", "size-text": "normal", "target-blank-apps": [], "text-color": "#ffffff", "top-menu-apps": [], "top-menu-mouse-over-hidden-label": 0, "top-side-menu-apps": [], "use-avatar": false, "external-sites-in-top-menu": "0", "force-light-icon": "0" } ``` ### Steps to reproduce It appears in the nextcloud log as you browse nextcloud with the side menu. I did not test other menu configurations. ### Observed Results The error below being repeated every few seconds in the log Undefined array key "HTTP_USER_AGENT" at /var/www/nextcloud/apps/side_menu/lib/AppInfo/Application.php#109 ### Expected Results No error ### More informations I was able to stop the error by changing the following on line 109 of /var/www/nextcloud/apps/side_menu/lib/AppInfo/Application.php if (strpos($_SERVER['HTTP_USER_AGENT'], 'Nextcloud Desktop Client') !== false) { changed to if (strpos($_SERVER['HTTP_USER_AGENT'], 'Nextcloud Desktop Client') !== false) { Apologies for the formatting, the markdown wasn't working for some reason. Otherwise terrific nextcloud app! It makes my nextcloud look wonderful. Thank you.
Owner

Fixed in v5.0.3!

Fixed in v5.0.3!
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deblan/side_menu#422
No description provided.