Skip to content

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

@JungeG

Description

@JungeG

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions