Skip to content

[10.x] Illuminate\Filesystem\join_paths(): Argument #2 must be of type string, null given #49466

@tylernathanreed

Description

@tylernathanreed

Laravel Version

10.38.1

PHP Version

8.2.12

Database Driver & Version

No response

Description

I recently ran composer update, which pulled in the latest Laravel version. My tests started reported errors that didn't previously exist, which indicates a breaking change.

After some investigation, I discovered that it was caused by #49433, which no longer accepts null as a valid value for functions like app_path, base_path, public_path, etc.

While substituting an empty string instead of null fixes the issue, I wouldn't expect to have to update my project like this unless I was making a major Laravel upgrade (e.g. L11).

Steps To Reproduce

Within php artisan tinker:

base_path(null); // Works on Laravel 10.38.0; throws exception on Laravel 10.38.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions