Uploaded image for project: 'PHP ORMs'
  1. PHP ORMs
  2. PHPORM-163

Ensure maxTimeMS query option is cast to an integer

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

      When toMql() prepares the maxTimeMS option, it multiplies by 1000. PHPLIB enforces that the option is an integer, so if the user happened to specify a float for the Builder::timeout() method (the only way to get sub-second precision) this will result in a float being passed to PHPLIB and yield an exception.

      Consider working around this by casting the multiplied value back to an integer.

      This was originally reported by chris.cho@mongodb.com in #php-driver.

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

              Created:
              Updated: