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

occ files:scan reports error "Implicit conversion from float XXX to int loses precision" #31692

Closed
spicemint opened this issue Mar 3, 2022 · 1 comment · Fixed by #32059
Closed
Labels

Comments

@spicemint
Copy link

Linux archlinux 5.16.11-arch1-1, nextcloud 23.0.2, nginx/1.20.2, PHP 8.1.3, mariadb 10.7.3, preview generator 4.0.0
Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz (12 cores), 24GB RAM

command:
sudo -u nextcloud /usr/bin/php /usr/share/webapps/nextcloud/occ files:scan --all

should result in completing scan for all users without errors but runs into following issue:

sudo -u nextcloud /usr/bin/php /usr/share/webapps/nextcloud/occ files:scan --all
Starting scan for user 1 out of 3 (joe)
Starting scan for user 2 out of 3 (david)
Starting scan for user 3 out of 3 (herb)

In Scan.php line 293:

Implicit conversion from float 39.31666666666667 to int loses precision

@st3iny st3iny transferred this issue from nextcloud/previewgenerator Mar 24, 2022
@st3iny st3iny added bug 0. Needs triage Pending check for reproducibility or if it fits our roadmap feature: occ labels Mar 24, 2022
@st3iny st3iny changed the title error Implicit conversion from float XXX to int loses precision occ files:scan reports error "Implicit conversion from float XXX to int loses precision" Mar 24, 2022
@cld4h
Copy link
Contributor

cld4h commented Apr 22, 2022

return sprintf('%02d:%02d:%02d', ($secs / 3600), ($secs / 60 % 60), $secs % 60);

return sprintf('%02d:%02d:%02d', (int)($secs / 3600), ((int)($secs / 60) % 60), $secs % 60);

cld4h added a commit to cld4h/server that referenced this issue Apr 22, 2022
occ files:scan reports error "Implicit conversion from float XXX to int loses precision"
@st3iny st3iny added 3. to review Waiting for reviews and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Apr 22, 2022
cld4h added a commit to cld4h/server that referenced this issue Apr 26, 2022
occ files:scan reports error "Implicit conversion from float XXX to int loses precision"

Signed-off-by: cld4h <20869428+cld4h@users.noreply.github.com>
PVince81 added a commit that referenced this issue Jun 10, 2022
st3iny added a commit that referenced this issue Jun 12, 2022
occ files:scan reports error "Implicit conversion from float XXX to int loses precision"

Signed-off-by: cld4h <20869428+cld4h@users.noreply.github.com>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
blizzz added a commit that referenced this issue Jun 13, 2022
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 a pull request may close this issue.

3 participants