nwilging / laravel-slack-bot

A Slack bot integration for Laravel projects
MIT License
17 stars 2 forks source link

Handle false unfurl flags correctly #30

Closed lucidlogic closed 1 year ago

lucidlogic commented 1 year ago
$unfurlOptions['links'] = false;
empty($unfurlOptions['links']) === true;

The issue is that if links are set to false(to unfurl) they never get sent to the API. I've changed to test to illustrate the issue.

this describes the issue further https://stackoverflow.com/questions/1219542/in-where-shall-i-use-isset-and-empty

"On the other hand the empty() function checks if the variable has an empty value empty string, 0, NULL or False. Returns FALSE if var has a non-empty and non-zero value."