-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/core#560 Replace instances of CRM_Core_Error::fatal with Exceptio… #15941
dev/core#560 Replace instances of CRM_Core_Error::fatal with Exceptio… #15941
Conversation
(Standard links)
|
67cb76e
to
c364214
Compare
CRM/SMS/Form/Provider.php
Outdated
@@ -113,8 +113,12 @@ public function setDefaultValues() { | |||
$name = CRM_Utils_Request::retrieve('key', 'String', $this, FALSE, NULL); | |||
if ($name) { | |||
$defaults['name'] = $name; | |||
$provider = CRM_SMS_Provider::singleton(['provider' => $name]); | |||
$defaults['api_url'] = $provider->_apiURL; | |||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So my hesitation is around this one & the next one which adds handling. The previous behaviour here was a fatal when the provider was invalid. Without the catch here the form layer would give the equivalent of that - but with the catch it seems an obscure edge case bug would be ignored
CRM/SMS/Page/Callback.php
Outdated
try { | ||
$provider = CRM_SMS_Provider::singleton($_REQUEST); | ||
} | ||
catch (CRM_Core_exception $e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here - we are adding handling for what appears to be an obscure edge case bug where the no-change would be to leave it uncaught
…ns or Status bounces in SMS processing and appropriately handle error after
c364214
to
4a0e3fe
Compare
ok @eileenmcnaughton i have reverted the changes in those 2 places |
looks good now |
…ns or Status bounces in SMS processing and appropriately handle error after
Overview
This replaces instances of
CRM_Core_Error::fatal
in the SMS subsystem with CRM_Core_Exceptions or CRM_Core_Error::statusBounce as appropriate and updates the relevant functions to handle the change in error handlingBefore
Legacy function used
After
Modern functions used
ping @eileenmcnaughton @mattwire