Skip to content

Conversation

@ShGKme
Copy link
Contributor

@ShGKme ShGKme commented May 28, 2024

☑️ Resolves

🛠️ API Checklist

🚧 Tasks

  • Make expireDate nullable and check for null on setting date

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • 📘 API documentation in docs/ has been updated or is not required
  • 🔖 Capability is added or not needed

@ShGKme ShGKme added this to the 💙 Next Major (30) milestone May 28, 2024
@ShGKme ShGKme self-assigned this May 28, 2024
@ShGKme
Copy link
Contributor Author

ShGKme commented May 28, 2024

/backport to stable29

@ShGKme
Copy link
Contributor Author

ShGKme commented May 28, 2024

/backport to stable28

@ShGKme
Copy link
Contributor Author

ShGKme commented May 28, 2024

/backport to stable27

@SystemKeeper
Copy link
Contributor

  • Or is it better to fix on server side?

If I understand the changes correctly, the public interface always allowed it to be null?

https://github.com/nextcloud/server/pull/44485/files#diff-10411333a1207c164cd88b80b0df9d1987227d1bfb4ae215454b34fc28eb48aa

Which I would then say needs to be fixed in talk?

Copy link
Contributor

@nfebe nfebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok so far.

$share->setPermissions($permissions);

if ($expireDate !== '') {
if ($expireDate !== null && $expireDate !== '') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty returns true for both null and empty string ('').

Suggested change
if ($expireDate !== null && $expireDate !== '') {
if (!empty($expireDate)) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I wanted to keep it separated to explicitly show 2 different cases, because '' and null have different semantics here

@AndyScherzinger AndyScherzinger requested a review from artonge May 28, 2024 20:51
@ShGKme ShGKme requested a review from danxuliu May 29, 2024 09:38
@ShGKme
Copy link
Contributor Author

ShGKme commented May 29, 2024

@ShGKme ShGKme closed this May 29, 2024
@Antreesy Antreesy deleted the fix/attachments-with-no-expire-date branch May 31, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants