Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: PHP8.1 - Implicit conversion from float to int loses precision at /3rdparty/deepdiver/zipstreamer/src/Count64.php#121 #35171

Closed
6 of 9 tasks
solracsf opened this issue Nov 15, 2022 · 4 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 25-feedback bug feature: sharing

Comments

@solracsf
Copy link
Member

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

See error log.

Steps to reproduce

N/A

Expected behavior

No error.

Installation method

No response

Operating system

No response

PHP engine version

PHP 8.1

Web server

No response

Database engine version

No response

Is this bug present after an update or on a fresh install?

No response

Are you using the Nextcloud Server Encryption module?

No response

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

N/A

Nextcloud Signing status

No response

Nextcloud Logs

{
  "reqId": "gYeENZ4vo5RyfgkrWykn",
  "level": 3,
  "time": "2022-11-15T08:17:37+00:00",
  "remoteAddr": "5.50.56.174",
  "user": "--",
  "app": "PHP",
  "method": "GET",
  "url": "/s/Rx6bg48H8nRLnQj/download",
  "message": "Implicit conversion from float 1.8446744069414584E+19 to int loses precision at /var/www/nextcloud/3rdparty/deepdiver/zipstreamer/src/Count64.php#121",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.42",
  "version": "24.0.7.1",
  "exception": {
    "Exception": "Error",
    "Message": "Implicit conversion from float 1.8446744069414584E+19 to int loses precision at /var/www/nextcloud/3rdparty/deepdiver/zipstreamer/src/Count64.php#121",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/3rdparty/deepdiver/zipstreamer/src/Count64.php",
        "line": 121,
        "function": "onError",
        "class": "OC\\Log\\ErrorHandler",
        "type": "::",
        "args": [
          8192,
          "Implicit conversion from float 1.8446744069414584E+19 to int loses precision",
          "/var/www/nextcloud/3rdparty/deepdiver/zipstreamer/src/Count64.php",
          121
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/deepdiver/zipstreamer/src/ZipStreamer.php",
        "line": 387,
        "function": "ZipStreamer\\pack64le",
        "args": [
          {
            "__class__": "ZipStreamer\\Lib\\Count64_64"
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/deepdiver/zipstreamer/src/ZipStreamer.php",
        "line": 480,
        "function": "buildZip64ExtendedInformationField",
        "class": "ZipStreamer\\ZipStreamer",
        "type": "->",
        "args": [
          {
            "__class__": "ZipStreamer\\Lib\\Count64_64"
          },
          {
            "__class__": "ZipStreamer\\Lib\\Count64_64"
          }
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/deepdiver/zipstreamer/src/ZipStreamer.php",
        "line": 259,
        "function": "buildCentralDirectoryHeader",
        "class": "ZipStreamer\\ZipStreamer",
        "type": "->",
        "args": [
          "Fichier candidats/",
          null,
          0,
          0,
          {
            "__class__": "ZipStreamer\\Lib\\Count64_64"
          },
          {
            "__class__": "ZipStreamer\\Lib\\Count64_64"
          },
          0,
          1106051088,
          true
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Streamer.php",
        "line": 115,
        "function": "addEmptyDir",
        "class": "ZipStreamer\\ZipStreamer",
        "type": "->",
        "args": [
          "Fichier candidats/"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/legacy/OC_Files.php",
        "line": 215,
        "function": "addDirRecursive",
        "class": "OC\\Streamer",
        "type": "->",
        "args": [
          "/INTERWAY/Fichier candidats"
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/files_sharing/lib/Controller/ShareController.php",
        "line": 710,
        "function": "get",
        "class": "OC_Files",
        "type": "::",
        "args": [
          "/INTERWAY",
          "Fichier candidats",
          [
            false
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 225,
        "function": "downloadShare",
        "class": "OCA\\Files_Sharing\\Controller\\ShareController",
        "type": "->",
        "args": [
          "Rx6bg48H8nRLnQj",
          null,
          "",
          ""
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 133,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Files_Sharing\\Controller\\ShareController"
          },
          "downloadShare"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 172,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Files_Sharing\\Controller\\ShareController"
          },
          "downloadShare"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 298,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Files_Sharing\\Controller\\ShareController",
          "downloadShare",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          [
            "",
            "Rx6bg48H8nRLnQj",
            "files_sharing.Share.downloadShare"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1030,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/s/Rx6bg48H8nRLnQj/download"
        ]
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/nextcloud/lib/private/Log/ErrorHandler.php",
    "Line": 92,
    "CustomMessage": "--"
  },
  "id": "63734bdcd9b8b"
}

Additional info

No response

@solracsf solracsf added bug 0. Needs triage Pending check for reproducibility or if it fits our roadmap 24-feedback labels Nov 15, 2022
@szaimen
Copy link
Contributor

szaimen commented Nov 15, 2022

cc @come-nc

@szaimen

This comment was marked as resolved.

@solracsf
Copy link
Member Author

Not fixed on 25.0.7 RC1

@solracsf
Copy link
Member Author

solracsf commented Sep 3, 2024

Fixed by DeepDiver1975/PHPZipStreamer#11

@solracsf solracsf closed this as completed Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 25-feedback bug feature: sharing
Projects
None yet
Development

No branches or pull requests

3 participants