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

Error access API - PHP message: PHP Fatal error #32400

Open
Pic-Event opened this issue Dec 17, 2024 · 1 comment
Open

Error access API - PHP message: PHP Fatal error #32400

Pic-Event opened this issue Dec 17, 2024 · 1 comment
Labels
Bug This is a bug (something does not work as expected)

Comments

@Pic-Event
Copy link

Bug

Got error 'PHP message: PHP Fatal error: Uncaught TypeError: realpath(): Argument #1 ($path) must be of type string, array given in [.../htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php]

Must change
if (false == $realPath = @realpath($path)) return null;

To
if (is_array($path) ){
if (false == $realPath = @realpath($path[0])) return null;
} else
{
if (false == $realPath = @realpath($path)) return null;
}

Each update of dolibarr I have to do this.

Thanks

Dolibarr Version

20.0.1

Environment PHP

8.2.26

Environment Database

MySQL or MariaDB 10.6.18-MariaDB-0ubuntu0.22.04.1

Steps to reproduce the behavior and expected behavior

Try to access .../api/index.php/explorer/

Attached files

No response

@Pic-Event Pic-Event added the Bug This is a bug (something does not work as expected) label Dec 17, 2024
@erikvanberkum
Copy link
Contributor

I dont have this issue. The file you are pointing to is not a dolibarr file but comes from the framework? You have some other configuration or change that could cause this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

2 participants