Error: Call to a member function addError() on null in Drupal\slack\Slack->sendMessage()

Comments

binnythomas created an issue. See original summary.

binnythomas’s picture

Title: Error: Call to undefined method Drupal\\slack\\Slack::messenger() in Drupal\\slack\\Slack->sendMessage() » Error: Call to a member function addError() on null in Drupal\slack\Slack->sendMessage()
Issue summary: View changes
binnythomas’s picture

Assigned: Unassigned » binnythomas
binnythomas’s picture

StatusFileSize
new1.43 KB

Attaching patch with a fix.

binnythomas’s picture

Status: Needs work » Needs review
binnythomas’s picture

Assigned: binnythomas » Unassigned
tr’s picture

Priority: Major » Normal
Status: Needs review » Reviewed & tested by the community

This error only happens if you have not set the slack_webhook_url configuration variable and are trying to send a slack message using this module's service.

This error does not happen with the test form because the test form checks the configuration variable and does not try to send the message if the variable is empty.

The patch in #4 still applies and fixes the error. RTBC.

tr’s picture

StatusFileSize
new1.45 KB
new480 bytes

Fixed a trivial coding standards error.

  • adci_contributor committed e6d8106 on 8.x-1.x authored by TR
    Issue #3110719 by TR, binnythomas: Error: Call to a member function...
adci_contributor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.