Skip to content

Erroneous throwing of Exception in MongoDbProducer #1031

Closed

Description

@josefsabl

I am writing here as php-enqueue/mongodb does not accept issues.

There is a silly bug on this line:

https://github.com/php-enqueue/mongodb/blob/1a8a2da0b866c5c4fee8a6d10a5130a2c7c011b0/MongodbProducer.php#L113

PHP Exception does not accept null as second argument. It is optional, yes, but must be int if provided.

This is an issue and not a cosmetic bug, because the previous exception is lost and doesn't show up in Sentry, logs or whatever.

Activity

  1. Steveb-p commented on Mar 17, 2020

    @Steveb-p
    Contributor

    I am writing here as php-enqueue/mongodb does not accept issues.

    As is the case for most mono-repos 😄

    PHP Exception does not accept null as second argument. It is optional, yes, but must be int if provided.

    Do you mind creating a PR? It should be a simple change to use code from the exception that was caught, should be sufficient.
    Since you're creating an relevant issue, I'd say it would be best to credit you as the one introducing the change.

    doesn't show up in Sentry

    🍺 for using Sentry 😄

  2. josefsabl commented on Mar 17, 2020

    @josefsabl
    ContributorAuthor

    As is the case for most mono-repos 😄

    Understood, I just didn't know if I am reporting in correct place ;-)

    Do you mind creating a PR

    Yea, will have to do it anyways since this did bite us bad as there is one more bug in documentation so I will need to fix it as well.

    🍺🍺

  3. added a commit that references this issue on Mar 18, 2020
    1e11dce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions