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

Update UpdateLeantime.php #2844

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update UpdateLeantime.php #2844

wants to merge 1 commit into from

Conversation

Er1c85
Copy link

@Er1c85 Er1c85 commented Dec 4, 2024

Added a check of the retval of exec('cp') in case, like in 3.3.1, it fails for some reason. In 3.3.1, it was trying to cp from .../cache/leantime/* but the new files were unzipped into the folder .../cache/* Also, added a try/catch block around ZipArchive because it was not installed by default on my system. With the try/catch block, a nice error message can be displayed for the user

Description

Please include a short description of the suggested change and the reasoning behind the approach you have chosen.

Link to ticket

Please add a link to the GitHub issue being addressed by this change.

[Bug]: bin/leantime system:update does not update #2838

Type

  • Fix
  • Feature
  • Cleanup

Screenshot of the result

If your change affects the user interface, you should include a screenshot of the result with the pull request.

Added a check of the retval of exec('cp') in case, like in 3.3.1, it fails for some reason.  In 3.3.1, it was trying to cp from .../cache/leantime/* but the new files were unzipped into the folder .../cache/*
Also, added a try/catch block around ZipArchive because it was not installed by default on my system.  With the try/catch block, a nice error message can be displayed for the user
@Er1c85 Er1c85 requested a review from a team as a code owner December 4, 2024 05:56
@Er1c85 Er1c85 requested review from ctanveer and removed request for a team December 4, 2024 05:56
@CLAassistant
Copy link

CLAassistant commented Dec 4, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@marcelfolaron marcelfolaron left a comment

Choose a reason for hiding this comment

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

Thanks Eric. Can you update the Exception type in your catch to start with a \Exception? And then just run make fix-code-style to resolve the code style issue

@bedo2991
Copy link

A c is missing in io->success('New update zip file - line 130.
The echo and print_r methods should probably be an io->text( ?

@bedo2991
Copy link

Apart from that and this unrelated output, it worked. Thanks!

mysqldump: unknown variable 'column-statistics=0'

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.

4 participants