这是indexloc提供的服务,不要输入任何密码
Skip to content

runtime error: slice bounds out of range #5

@digitalcrab

Description

@digitalcrab

Hello

Lets assume that we have this example PHP code, lets run it ;)

$ cat test_mail.php
<?php
$to = 'nobody@example.com';
$subject = 'Test';
$message = 'Test message.';
$headers = 'From: webmaster@example.com' . "\r\n" .
  'Reply-To: webmaster@example.com' . "\r\n" .
  'X-Mailer: PHP/' . phpversion();
$result = mail($to, $subject, $message, $headers);
var_dump($result);

Here is the result

$ php test_mail.php
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
github.com/mailhog/mhsendmail/cmd.Go()
        /home/vagrant/go/src/github.com/mailhog/mhsendmail/cmd/cmd.go:72 +0x10ce
main.main()
        /home/vagrant/go/src/github.com/mailhog/mhsendmail/main.go:6 +0x14

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
        /usr/lib/go/src/runtime/asm_amd64.s:1696 +0x1

Here is the config

$ cat /etc/php5/cli/conf.d/zz-hitmeister.ini | grep sendmail_path
sendmail_path = /usr/bin/env /home/vagrant/go/bin/mhsendmail

Looks like it is almost the same as #3 . Hope you will have time to fix it ;)

have a nice day

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