Closed kasperbrandenburg closed 7 years ago
I tested this out with a numeric sitename and it appears to work fine. Do you have more details?
Writing 411 as text direct in the curl-post() method also works. Its only when the attribute is populated. I tried to grab the actual output by doing print_r($curl); This is some of the data i got back
Error: Uncaught TypeError: Cannot use 'in' operator to search for 'success' in Curl\Curl Object ( [curl]=>Resourceid#15[id]=>1[error]=>1[errorCode]=>400[errorMessage]=>HTTP/1.1400BadRequest[curlError]=>[curlErrorCode]=>0[curlErrorMessage]=>[httpError]=>1[httpStatusCode]=>400[httpErrorMessage]=>HTTP/1.1400BadRequest[baseUrl]=>https: //hooks.slack.com/services/
Hmm, can you try dumping the POST data being passed to Slack. My guess is that getSiteName()
is returning null
(though that shouldn't happen).
@kasperbrandenburg is this still occurring?
in
Slack.php:62
the CURL 'username' => Util::getSiteName(), attribute seems to cause problems. I created a standard webhook to a slack-channel, and got a 400 Bad request back. I Changed it to "webhookbot" and it startet to work.