diff --git a/src/OwaClient.php b/src/OwaClient.php index 99a7783..3ac9d84 100644 --- a/src/OwaClient.php +++ b/src/OwaClient.php @@ -88,7 +88,8 @@ public function getCredentials() { if ( file_exists( $file ) ){ - $file_contents = include( $file ); + $file_contents = parse_ini_file( $file ); + $file_contents = $file_contents['defaults']; if ( is_array($file_contents) && array_key_exists( 'api_key', $file_contents ) && array_key_exists( 'auth_key', $file_contents )) { @@ -103,6 +104,7 @@ public function getCredentials() { } private function getHomeDirectory() { + // On Unix systems, use the HOME environment variable if ($home = getenv( 'HOME' ) ) {