yajra / pdo-via-oci8

PHP PDO_OCI functions via OCI8 extension
Other
88 stars 61 forks source link

Check existence of charset key in options in Oci8 constuctor #10

Closed alfmel closed 10 years ago

alfmel commented 10 years ago

The constructor makes use of the charkey value in the options array. When using an error setting that turns notices into errors and when you convert all errors into exceptions, this section of code will throw an exception when the options array doesn't contain the charkey key.

This patch checks for the existence of the charset key and sets values appropriately so that PHP doesn't throw an exception.

You may not need it since your DSN parsing comes from Laravel OCI8 - Connector, but I figured I would submit anyway.