Skip to content

Cannot send a message with Laravel 4.2 #2

@ipol2n

Description

@ipol2n

Hi,

When I tried to send a message with Laravel 4.2, I got this error "parse_url() expects parameter 1 to be string, array given".

Stack trace:

Stack trace:

0 [internal function]: Illuminate\Exception\Handler->handleError(2, 'parse_url() exp...', '/Users/ipol2n/h...', 51, Array)

1 /Users/ipol2n/html/warroom-cbc/vendor/guzzlehttp/psr7/src/Uri.php(51): parse_url(Array)

2 /Users/ipol2n/html/warroom-cbc/vendor/guzzlehttp/guzzle/src/Client.php(142): GuzzleHttp\Psr7\Uri->__construct(Array)

3 /Users/ipol2n/html/warroom-cbc/vendor/guzzlehttp/guzzle/src/Client.php(115): GuzzleHttp\Client->buildUri(Array, Array)

4 /Users/ipol2n/html/warroom-cbc/vendor/guzzlehttp/guzzle/src/Client.php(129): GuzzleHttp\Client->requestAsync('post', Array, Array)

5 /Users/ipol2n/html/warroom-cbc/vendor/guzzlehttp/guzzle/src/Client.php(87): GuzzleHttp\Client->request('post', Array, Array)

6 /Users/ipol2n/html/warroom-cbc/vendor/maknz/slack/src/Client.php(358): GuzzleHttp\Client->__call('post', Array)

7 /Users/ipol2n/html/warroom-cbc/vendor/maknz/slack/src/Client.php(358): GuzzleHttp\Client->post(Array, Array)

8 /Users/ipol2n/html/warroom-cbc/vendor/maknz/slack/src/Message.php(410): Maknz\Slack\Client->sendMessage(Object(Maknz\Slack\Message))

9 [internal function]: Maknz\Slack\Message->send('test')

10 /Users/ipol2n/html/warroom-cbc/vendor/maknz/slack/src/Client.php(124): call_user_func_array(Array, Array)

11 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(208): Maknz\Slack\Client->__call('send', Array)

12 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(208): Maknz\Slack\Client->send('test')

13 /Users/ipol2n/html/warroom-cbc/app/routes.php(210): Illuminate\Support\Facades\Facade::__callStatic('send', Array)

14 /Users/ipol2n/html/warroom-cbc/app/routes.php(210): Maknz\Slack\Laravel\Facade::send('test')

15 [internal function]: {closure}()

16 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Routing/Route.php(109): call_user_func_array(Object(Closure), Array)

17 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1033): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))

18 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1001): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))

19 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))

20 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))

21 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)

22 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)

23 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)

24 /Users/ipol2n/html/warroom-cbc/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)

25 /Users/ipol2n/html/warroom-cbc/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))

26 /Users/ipol2n/html/warroom-cbc/public/index.php(49): Illuminate\Foundation\Application->run()

27 {main} [] []

I tried to debug and found that some config of this package are missing.
I dump $app['config'] and found only these config.

  'slack::allow_markdown' => 
    array (size=0)
      empty
  'slack::markdown_in_attachments' => 
    array (size=0)
      empty
  'slack::unfurl_media' => 
    array (size=0)
      empty

Could you please help?

Thank you

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