Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-12427

PHP::raiseError objects are not returned up the call stack

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.2
    • Fix Version/s: 4.3.2
    • Component/s: CiviSMS
    • Labels:
      None

      Description

      I have been working with the Twilio and Clickatell SMS providers, and observed that the vendor-specific SMS send functions do not return a PHP_Error object in the event of an error, contrary to the function documentation. Despite inconsistencies between the code and the function documentation, the current implementation (i.e., throwing an exception instead of returning the PHP_Error object) prevents the sendSMS function in the Activity.php file from displaying meaningful error messages to the end user.

      Attached is a diff patch for this issue.

      I also pushed the code to GitHub (pull request forthcoming). https://github.com/mmikitka/civicrm-core/tree/handle_pear_error_objects

        Attachments

          Activity

            People

            • Assignee:
              ravish.nair Ravish Nair
              Reporter:
              mmikitka Matt
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: