leomarquine / php-etl

Extract, Transform and Load data using PHP.
MIT License
178 stars 81 forks source link

MySqlConnector unix_socket should check for not empty #12

Closed ryantxr closed 5 years ago

ryantxr commented 6 years ago

In MySqlConnector you have:

        if (isset($unix_socket)) {
            $dsn['unix_socket'] = $unix_socket;
        }

I think it really should be this:

        if (!empty($unix_socket)) {
            $dsn['unix_socket'] = $unix_socket;
        }

The standard database config file that comes with Laravel defines unix_socket but leaves it empty. The code you have now sees that unix_socket is set and tries to use it even though it is an empty string.

I will do a pull request if you like.

leomarquine commented 5 years ago

I just tagged a new release that should fix it.