Skip to content

Version 8 and newer of PHP will throw an exception when $_SERVER['SERVER_NAME'] not set #17

@gilzow

Description

@gilzow

We set $requestUrl = false; at line 96 in platformsh-laravel-env.php. $requestUrl is then used as the needle in strpos() at line 105. If $_SERVER['SERVER_NAME'] is not set, requestUrl remains false. In versions of PHP before 8, a deprecation notice is triggered, but the code will still function. However, from PHP8 onward, this throws a fatal error.

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