The error handling of the @ character has changed with PHP8. If functions are ad…dressed that are deactivated on the server side, a fatal error occurs even if this function is provided with an @.
In the case of NextCloud, this concerns the following line:
`/lib/private/Files/Storage/Local.php:381`
`$space = @disk_free_space($sourcePath);`
in PHP8 mb check the funktion with function_exists and not use an @ for testing the function. (In shared hosting some php functions are disabled)
### Steps to reproduce
1. Activate PHP 8.x
2. Deactivate for example disk_free_space in PHP.ini
3. Open Settings in NextCloud
### Actual behaviour
NextCloud generates a internal server error
### Server configuration
**Operating system:**
Debian
**Web server:**
Apache 2.4
**Database:**
MariaDB
**PHP version:**
8.0.12
**Nextcloud version:** (see Nextcloud admin page)
22.2.3
**Updated from an older Nextcloud/ownCloud or fresh install:**
Fresh install
**Where did you install Nextcloud from:**
Download from nextcloud.com
### Logs
{"reqId":"YZUBr8NSACDuR8qUbP5EuwAAAFg","level":3,"time":"2021-11-17T13:20:48+00:00","remoteAddr":"37.24.xxx.xxx","user":"admin","app":"index","method":"GET","url":"/index.php/settings/user","message":"Call to undefined function OC\\Files\\Storage\\disk_free_space()","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:94.0) Gecko/20100101 Firefox/94.0","version":"22.2.3.0","exception":{"Exception":"Exception","Message":"Call to undefined function OC\\Files\\Storage\\disk_free_space()","Code":0,"Trace":[{"file":"/var/www/clients/clientX/webX/web/hugihi/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/clients/clientX/webX/web/hugihi/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/clients/clientX/webX/web/hugihi/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/clients/clientX/webX/web/hugihi/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/clients/clientX/webX/web/hugihi/lib/private/AppFramework/Http/Dispatcher.php","Line":158,"Previous":{"Exception":"Error","Message":"Call to undefined function OC\\Files\\Storage\\disk_free_space()","Code":0,"Trace":[{"file":"/var/www/clients/clientX/webX/web/hugihi/lib/private/Files/Storage/Wrapper/Wrapper.php","line":334,"function":"free_space","class":"OC\\Files\\Storage\\Local","type":"->"},{"file":"/var/www/clients/clientX/webX/web/hugihi/lib/private/legacy/OC_Helper.php","line":531,"function":"free_space","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/clients/clientX/webX/web/hugihi/apps/settings/lib/Settings/Personal/PersonalInfo.php","line":111,"function":"getStorageInfo","class":"OC_Helper","type":"::"},{"file":"/var/www/clients/clientX/webX/web/hugihi/apps/settings/lib/Controller/CommonSettingsTrait.php","line":137,"function":"getForm","class":"OCA\\Settings\\Settings\\Personal\\PersonalInfo","type":"->"},{"file":"/var/www/clients/clientX/webX/web/hugihi/apps/settings/lib/Controller/PersonalSettingsController.php","line":76,"function":"formatSettings","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/clients/clientX/webX/web/hugihi/apps/settings/lib/Controller/CommonSettingsTrait.php","line":148,"function":"getSettings","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/clients/clientX/webX/web/hugihi/apps/settings/lib/Controller/PersonalSettingsController.php","line":67,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/clients/clientX/webX/web/hugihi/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"index","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/clients/clientX/webX/web/hugihi/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/clients/clientX/webX/web/hugihi/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/clients/clientX/webX/web/hugihi/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/clients/clientX/webX/web/hugihi/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/clients/clientX/webX/web/hugihi/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/clients/clientX/webX/web/hugihi/lib/private/Files/Storage/Local.php","Line":381},"CustomMessage":"--"}}