Skip to content

Commit

Permalink
switch from php aray to ini format for credentials file.
Browse files Browse the repository at this point in the history
  • Loading branch information
padams committed Nov 7, 2021
1 parent 12b5ddc commit 3fb50f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/OwaClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 )) {

Expand All @@ -103,6 +104,7 @@ public function getCredentials() {
}

private function getHomeDirectory() {

// On Unix systems, use the HOME environment variable
if ($home = getenv( 'HOME' ) ) {

Expand Down

0 comments on commit 3fb50f7

Please sign in to comment.