nextcloud / nextcloud/server

[Bug]: Make nullable explicit to silence STDERR message

Open Beginner friendly
#53,670 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 31-feedback bug dependencies feature: external storage upstream
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

Warning on STDERR

PHP Deprecated:  Icewind\SMB\Native\NativeState::lseek(): Implicitly marking parameter $path as nullable is deprecated, the explicit nullable type must be used instead in /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php on line 346

when running e.g.

php -f /var/www/nextcloud/occ files:scan --unscanned --all > /dev/null
Steps to reproduce

Run

php -f /var/www/nextcloud/occ files:scan --unscanned --all > /dev/null

with external storage included via SMB.

Expected behavior

No message on STDERR

Nextcloud Server version

31

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.4

Web server

Apache (supported)

Database engine version

MariaDB

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

Updated from a MINOR version (ex. 32.0.1 to 32.0.2)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report
redacted
List of activated Apps
Enabled:
  - activity: 4.0.0
  - admin_audit: 1.21.0
  - app_api: 5.0.2
  - bruteforcesettings: 4.0.0
  - calendar: 5.3.3
  - cfg_share_links: 7.0.1
  - circles: 31.0.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contacts: 7.1.3
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_downloadlimit: 4.0.0
  - files_external: 1.23.0
  - files_fulltextsearch: 31.0.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - firstrunwizard: 4.0.0
  - fulltextsearch: 31.0.0
  - fulltextsearch_elasticsearch: 31.0.0
  - groupfolders: 19.1.1
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - nextcloud_announcements: 3.0.0
  - notifications: 4.0.0
  - oauth2: 1.19.1
  - password_policy: 3.0.0
  - photos: 4.0.0-dev.1
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - richdocuments: 8.7.1
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - sharelisting: 1.2.0
  - support: 3.0.0
  - survey_client: 3.0.0
  - systemtags: 1.21.1
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - updatenotification: 1.21.0
  - user_ldap: 1.22.0
  - user_status: 1.11.0
  - viewer: 4.0.0
  - weather_status: 1.11.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - encryption: 2.19.0
  - files_fulltextsearch_tesseract: 27.0.1 (installed 27.0.1)
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - suspicious_login: 9.0.1
  - twofactor_nextcloud_notification: 5.0.0
  - twofactor_totp: 13.0.0-dev.0
Nextcloud Signing status

Nextcloud Logs

Additional info

Icewind upstream repos is nor archived. Last tag was 3.7.0, but the repos contains the following commit, which fixes the issue:

https://github.com/icewind1991/SMB/commit/42627c6bb8daa850615e0b819cb42ef52e67a7b2

You should consider picking this up.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php around line 346 and compare it with upstream commit 42627c6bb8daa850615e0b819cb42ef52e67a7b2. Run the occ files:scan --unscanned --all command with SMB external storage enabled. Done means the PHP 8.4 nullable deprecation no longer appears on STDERR.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.