Skip to content
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

PHP Warning: Argument #2 ($key) must be passed by reference, #75

Open
JungeG opened this issue Nov 4, 2021 · 0 comments
Open

PHP Warning: Argument #2 ($key) must be passed by reference, #75

JungeG opened this issue Nov 4, 2021 · 0 comments

Comments

@JungeG
Copy link

JungeG commented Nov 4, 2021

Hi!
I just updated to API-2.1.1-Snapshot and get following warning

PHP Warning: OAuth\Common\Http\Client\AbstractClient::OAuth\Common\Http\Client{closure}(): Argument #2 ($key) must be passed by reference, value given in phar:///etc/openhab/scripts/viessmann/Viessmann-Api-2.1.1-SNAPSHOT.phar/vendor/lusitanian/oauth/src/OAuth/Common/Http/Client/AbstractClient.php on line 70

my credentials.properties:

user=mail@mail.de
pwd=passwd
clientId=myclientid
installationId=
gatewayId=

my bootstrap.php:

`<?php

use Viessmann\API\ViessmannAPI;
use Viessmann\API\ViessmannApiException;
session_start();
include 'phar://' . DIR . '/Viessmann-Api-2.1.1-SNAPSHOT.phar/index.php';

$params = parse_ini_file(DIR . "/credentials.properties");
function print_exception($e){
echo "Message: " . $e->getMessage() . "\n";
echo "Code: " . $e->getCode() . "\n";
// echo "Trace:" . $e->getTraceAsString() . "\n";
}
;
$errorHandler= function($e)
{
$currentException=$e;
do {
print_exception($currentException);
} while ($currentException = $currentException->getPrevious());
};

set_exception_handler($errorHandler);
try {
$viessmannApi = new ViessmannAPI($params);
} catch (ViessmannApiException $e) {
$errorHandler($e);
exit();
}
`

How can I get rid of the warning or just ignore it?
Thanks Georg

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

No branches or pull requests

1 participant