Skip to content

Stub errorInfo() to prevent upstream issues #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2021

Conversation

Rarst
Copy link
Contributor

@Rarst Rarst commented Jun 15, 2021

The library is written for exception error handling (which is fine), but if any code treats it as generic PDO and calls errorInfo() things fall apart:

  1. Native PDO code barfs rather annoying No error: PDO constructor was not called warning, that isn't easy to work around.
  2. The return is null, rather than supposed three fields array structure.

Since the any real error would be an exception anyway, I stubbed the methods to hardcode a no-error state for anything that asks.

Not confident that is the way to go about it, but don't have a better idea. Open to explore alternative takes if there are any pointers. :)

Native PDO code expects constructor called for the method to work and returns `null` under circumstances.
@muglug muglug merged commit bf91226 into vimeo:master Jun 30, 2021
@muglug
Copy link
Collaborator

muglug commented Jun 30, 2021

Thanks!

@Rarst Rarst deleted the stub-errorinfo branch July 1, 2021 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants