Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-2841

Update API to accept null parameters

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      When making API calls and passing method arguments to the end-point, null values are not passed along.

      This is an issue when

      1. Manually passing null as an argument
      2. Attempting to set null as an argument to a method apart of a file encoded by ioncube
        • For example, AppModel::systemEncrypt($value, $key = null, $iv = null) must be passed all arguments because ioncube causes the error "Internal error: Failed to retrieve the default value"

      Update the Api controller to allow null parameters to be passed.
      i.e.

      if (isset($parameters[$param->name])) {
      

      probably needs to be

      if (array_key_exists($param->name, $parameters)) {
      

        Issue Links

          Activity

          Hide
          tyson Tyson Phillips (Inactive) added a comment -

          It wouldn't be possible to accept null values from the API because it's not possible to pass null. If a key is set, the value would likely be a blank (empty) string.

          Show
          tyson Tyson Phillips (Inactive) added a comment - It wouldn't be possible to accept null values from the API because it's not possible to pass null. If a key is set, the value would likely be a blank (empty) string.

            People

            • Assignee:
              tyson Tyson Phillips (Inactive)
              Reporter:
              tyson Tyson Phillips (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 45 minutes
                45m