Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-2500

Avoid dynamic property assignment in phongo_add_exception_prop()

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • PHP Drivers

      While implementing BulkWriteCommandExcepiton in PHPC-2494, I observed the following deprecation notice at runtime:

      Deprecated: Creation of dynamic property Exception::$bulkWriteCommandResult is deprecated

      This is a logic error on my part, but it would be helpful if phongo_add_exception_prop() asserted that the exception class has the property defined before attempting assignment. If so, we should consider how best to surface that error, since throwing another exception at that point might only complicate things from the application's perspective.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: