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

CRM_Utils_Request::retrieve() does not support non-truthy defaults

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.7.19
    • Fix Version/s: Unscheduled
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No
    • How it works currently:
      Hide
      CRM_Utils_Request::retrieve('id', 'Int', $this, FALSE, 0); returns NULL if the URL does not contain a parameter 'id'.

      CRM_Utils_Request::retrieve('id', 'Int', $this, FALSE, 47); returns 47 if the URL does not contain a parameter 'id'.
      Show
      CRM_Utils_Request::retrieve('id', 'Int', $this, FALSE, 0); returns NULL if the URL does not contain a parameter 'id'. CRM_Utils_Request::retrieve('id', 'Int', $this, FALSE, 47); returns 47 if the URL does not contain a parameter 'id'.
    • How it should work:
      Hide
      CRM_Utils_Request::retrieve('id', 'Int', $this, FALSE, 0); returns integer 0 if the URL does not contain a parameter 'id'.

      CRM_Utils_Request::retrieve('id', 'Int', $this, FALSE, 47); returns 47 if the URL does not contain a parameter 'id'. (No change.)
      Show
      CRM_Utils_Request::retrieve('id', 'Int', $this, FALSE, 0); returns integer 0 if the URL does not contain a parameter 'id'. CRM_Utils_Request::retrieve('id', 'Int', $this, FALSE, 47); returns 47 if the URL does not contain a parameter 'id'. (No change.)

      Attachments

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            pittstains Frank J. Gómez
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: