-
Notifications
You must be signed in to change notification settings - Fork 271
getdir() problems in jqueryFileTree.php #273
Copy link
Copy link
Closed
Description
While trying out phpvirtualbox on a server running PHP 8.0.3, I ran into problems with the file selection dialog when trying to attach an ISO file.
This was due to the following error which showed up in the error logs:
PHP Fatal error: Cannot redeclare getdir() in /usr/share/webapps/phpvirtualbox/endpoints/jqueryFileTree.php on line 224
getdir() seems to be a built-in function in PHP, so I wonder how this worked before.
The easiest fix is to rename getdir() function to something else.
Then another error showed up:
PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in /usr/share/webapps/phpvirtualbox/endpoints/jqueryFileTree.php:256
For PHP versions >= 7.30 the fix is to use is_countable() instead of count().
With those fixes, directory selection is working now.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
