mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2026-04-26 10:55:56 +03:00
[GH-ISSUE #873] Fatal error: Call to undefined function disk_total_space() #583
Labels
No labels
Feature
Feature
Is It Really an Issue?
Need More Info
Request
Security
bug
duplicate
enhancement
enhancement
help wanted
invalid
pull-request
question
suggestion
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tinyfilemanager#583
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @timint on GitHub (Oct 20, 2022).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/873
Fatal error: Uncaught Error: Call to undefined function disk_total_space() in tinyfilemanager.php:2146
Using latest master build
@ririko5834 commented on GitHub (Oct 23, 2022):
I have the same issue.
Using php v8.0
@timint commented on GitHub (Oct 23, 2022):
This is a function in PHP that appears to be missing on some web hosts. Checking
if the function exists before use should solve the problem.
https://www.php.net/manual/en/function.disk-total-space.php
@smalos commented on GitHub (Oct 24, 2022):
This
fm_get_filesize(@disk_total_space($path))could be replaced with:
function_exists('disk_total_space') ? fm_get_filesize(@disk_total_space($path)) : 'n/a'@ririko5834 commented on GitHub (Oct 24, 2022):
It should be fixed
@smalos commented on GitHub (Oct 24, 2022):
How did you fix it?
@ririko5834 commented on GitHub (Oct 25, 2022):
I didn't, but I want to say that some contributor should fix it, make PR.
@timint commented on GitHub (Oct 25, 2022):
This is the line to edit:
<?php echo lng('PartitionSize').': <span class="badge badge-light">'.fm_get_filesize(@disk_free_space($path)) .'</span> '.lng('FreeOf').' <span class="badge badge-light">'.fm_get_filesize(@disk_total_space($path)).'</span>'; ?>github.com/prasathmani/tinyfilemanager@805308a013/tinyfilemanager.php (L2152)Replace it with something like this:
I don't have a cloned repo to commit this.