Skip to content

Undefined array key 1 at PingParserForWindows.php #29

Description

@DaGLiMiOuX

Hi there.

I've been trying to use your package for Laravel in order to use it to check status in some devices that will be configured within our application.

I've found that it works perfectly for Windows when the host exists, but it throws an error when the host does not exist. The system will be installed in a Linux, but our development team works with Windows 10. Can you please give it a check?

Undefined array key 1

at ...\vendor\acamposm\ping\src\Parsers\PingParserForWindows.php:130
    126▕     private function parseRoundTripTime(string $row): array
    127▕     {
    128▕         $rtt = explode(',', str_replace('ms', '', $row));
    129▕
  ➜ 130▕         $min = (float) explode(' = ', $rtt[0])[1] / 1000;
    131▕         $max = (float) explode(' = ', $rtt[1])[1] / 1000;
    132▕         $avg = (float) explode(' = ', $rtt[2])[1] / 1000;
    133▕
    134▕         return [

1   ...\vendor\acamposm\ping\src\Parsers\PingParserForWindows.php:130
      Illuminate\Foundation\Bootstrap\HandleExceptions::Illuminate\Foundation\Bootstrap\{closure}("Undefined array key 1", "...\vendor\acamposm\ping\src\Parsers\PingParserForWindows.php")

2   ...\vendor\acamposm\ping\src\Parsers\PingParserForWindows.php:181
      Acamposm\Ping\Parsers\PingParserForWindows::parseRoundTripTime("    (0% perdidos),")

Best regards,
D.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions