Skip to content

fix: the substr function will return an empty string instead of false#41508

Merged
DeepDiver1975 merged 1 commit intomasterfrom
fix_substr_for_activity_shares
Mar 20, 2026
Merged

fix: the substr function will return an empty string instead of false#41508
DeepDiver1975 merged 1 commit intomasterfrom
fix_substr_for_activity_shares

Conversation

@jvillafanez
Copy link
Member

Description

With the php8 update, the substr function returns an empty string instead of false.
In this particular cases, the $mountPath check for false fails, causing the code to go through an unintended path. Information returned by the affected function (getUsersSharingFile) is wrong, and it can affect to other apps, such as the activity app (see linked ticket)

Related Issue

Related to owncloud/activity#1230

Motivation and Context

Wrong information is stored and shown to the user. This PR fixes it.

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

@jvillafanez jvillafanez self-assigned this Mar 20, 2026
@update-docs
Copy link

update-docs bot commented Mar 20, 2026

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@DeepDiver1975 DeepDiver1975 merged commit 80db89b into master Mar 20, 2026
12 checks passed
@DeepDiver1975 DeepDiver1975 deleted the fix_substr_for_activity_shares branch March 20, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants