Avoid multiple calls to document_to_array() during argument validation

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This problem predates the introduction of document_to_array() in PHPLIB-1122, since is_first_key_operator() and is_pipeline() always converted their arguments to arrays.

      This issue is typical in the code path for validating update and replacement arguments, since both methods are called in succession. Ideally, we should process the array|object value once with document_to_array() and then inspect its return value.

              Assignee:
              Unassigned
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: