Suppress PHP warnings during stream init

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.1.3
    • Affects Version/s: 1.1.2
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      php -n -c. -r '$m = new MongoDB\Driver\Manager("mongodb://something.wrong:27020"); $m->selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY));'
      
      Warning: MongoDB\Driver\Manager::selectServer(): php_network_getaddresses: getaddrinfo failed: Name or service not known in Command line code on line 1
      
      Fatal error: Uncaught exception 'MongoDB\Driver\Exception\RuntimeException' with message 'No suitable servers found (`serverselectiontryonce` set): [Failed connecting to 'something.wrong:27020': php_network_getaddresses: getaddrinfo failed: Name or service not known]' in Command line code:1
      Stack trace:
      #0 Command line code(1): MongoDB\Driver\Manager->selectServer(Object(MongoDB\Driver\ReadPreference))
      #1 {main}
        thrown in Command line code on line 1
      

              Assignee:
              Jeremy Mikola
              Reporter:
              Hannes Magnusson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: