Skip to content

Conversation

@solracsf
Copy link
Member

Summary

Fix Call to a member function getMimeType() on string

Error stack
{
  "reqId": "w4lxlb2usOySbOXZl2bO",
  "level": 3,
  "time": "2025-12-18T10:46:59+01:00",
  "remoteAddr": "14.24.5.97",
  "user": "--",
  "app": "index",
  "method": "GET",
  "url": "/apps/files_sharing/publicpreview/8LYrm86HSwmCGCX?file=%2F2026%2FJANVIER+2026%2FVariables+paies%2F1_EMBAUCHE+ET+AVENANTS%2FLOPES+Diana%2FDoss+admin+1.jpg&x=32&y=32&mimeFallback=true&v=506c18&a=0",
  "message": "Call to a member function getMimeType() on string in file '/var/www/nextcloud/apps/files_sharing/lib/Controller/PublicPreviewController.php' line 135",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 Edg/143.0.0.0",
  "version": "31.0.12.3",
  "exception": {
    "Exception": "Exception",
    "Message": "Call to a member function getMimeType() on string in file '/var/www/nextcloud/apps/files_sharing/lib/Controller/PublicPreviewController.php' line 135",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 161,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Files_Sharing\\Controller\\PublicPreviewController"
          },
          "getPreview"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Files_Sharing\\Controller\\PublicPreviewController",
          "getPreview",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          {
            "token": "8LYrm86HSwmCGCX",
            "_route": "files_sharing.publicpreview.getpreview"
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1063,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/files_sharing/publicpreview/8LYrm86HSwmCGCX"
        ]
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 24,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
    "Line": 146,
    "Previous": {
      "Exception": "Error",
      "Message": "Call to a member function getMimeType() on string",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 200,
          "function": "getPreview",
          "class": "OCA\\Files_Sharing\\Controller\\PublicPreviewController",
          "type": "->",
          "args": [
            "8LYrm86HSwmCGCX",
            "/2026/JANVIER 2026/Variables paies/1_EMBAUCHE ET AVENANTS/LOPES Diana/Doss admin 1.jpg",
            32,
            32,
            false,
            true
          ]
        },
        {
          "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 114,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            {
              "__class__": "OCA\\Files_Sharing\\Controller\\PublicPreviewController"
            },
            "getPreview"
          ]
        },
        {
          "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
          "line": 161,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            {
              "__class__": "OCA\\Files_Sharing\\Controller\\PublicPreviewController"
            },
            "getPreview"
          ]
        },
        {
          "file": "/var/www/nextcloud/lib/private/Route/Router.php",
          "line": 315,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::",
          "args": [
            "OCA\\Files_Sharing\\Controller\\PublicPreviewController",
            "getPreview",
            {
              "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
            },
            {
              "token": "8LYrm86HSwmCGCX",
              "_route": "files_sharing.publicpreview.getpreview"
            }
          ]
        },
        {
          "file": "/var/www/nextcloud/lib/base.php",
          "line": 1063,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->",
          "args": [
            "/apps/files_sharing/publicpreview/8LYrm86HSwmCGCX"
          ]
        },
        {
          "file": "/var/www/nextcloud/index.php",
          "line": 24,
          "function": "handleRequest",
          "class": "OC",
          "type": "::",
          "args": []
        }
      ],
      "File": "/var/www/nextcloud/apps/files_sharing/lib/Controller/PublicPreviewController.php",
      "Line": 135
    },
    "message": "Call to a member function getMimeType() on string in file '/var/www/nextcloud/apps/files_sharing/lib/Controller/PublicPreviewController.php' line 135",
    "exception": [],
    "CustomMessage": "Call to a member function getMimeType() on string in file '/var/www/nextcloud/apps/files_sharing/lib/Controller/PublicPreviewController.php' line 135"
  },
  "id": "6943cddd68ee5"
}

Checklist

@solracsf solracsf added this to the Nextcloud 33 milestone Dec 18, 2025
@solracsf solracsf added bug 3. to review Waiting for reviews labels Dec 18, 2025
@solracsf
Copy link
Member Author

Duplicate

@solracsf solracsf closed this Dec 18, 2025
@solracsf solracsf deleted the addFileTypCheckPreview branch December 18, 2025 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants