Skip to content

Backslashes in file_put_contents() #926

@A-Printer

Description

@A-Printer

I was on 4.8.4. I opted in for the beta version and updated to the latest beta (4.9.0 21) with the built-in update feature.

Later I noticed a strange new file in my file system:

A new file named "resources\views\update.blade.php" appeared at the root of the site.

It turns out this line is the culprit, the backslashes should be forward slashes:

file_put_contents(base_path('resources\views\update.blade.php'), $file);

The result is an extra file that shouldn't be there:

Image

MAMP PRO 6.9 on macOS 15.5, with Apache and PHP 8.2.13

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