Skip to content

TypError unpack() expects parameter 2 to be string, bool given in Http/Helpers #152

@josefsabl

Description

@josefsabl

Version: dev-master#db73233

Bug Description

When I run the app on the PHP built-in server I get the unpack() expects parameter 2 to be string, bool given. The reason is that:

  • $_SERVER['REMOTE_ADDR'] === string(5) "[::1]"
  • which gets passed to inet_pton
  • which returns false
  • which is passed to unpack
  • which results in TypeError

See attached tracy.
TypeError_ unpack() expects parameter 2 to be string, bool given.zip

Is this a Nette bug? Is it PHP Server bug? Am I doing something wrong? I don't think I changed anything in the php server settings.

Steps To Reproduce

none

Expected Behavior

no crash, obviously

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