PrintNode / PrintNode-PHP

PHP API Library For PrintNode Remote Printing Service
https://www.printnode.com
MIT License
83 stars 64 forks source link

Fixes incorrect login in Example 1 #36

Open shakethatweight-simon opened 3 years ago

shakethatweight-simon commented 3 years ago

Fixes the following error

Fatal error: Uncaught TypeError: Argument 1 passed to PrintNode\Request::__construct() must be an instance of PrintNode\Credentials, instance of PrintNode\ApiKey given, called in my-file.php on line 13 and defined in vendor/printnode/printnode-php/src/PrintNode/Request.php:85

Stack trace:
#0 /var/www/vhosts/shakepack.co.uk/public/printnode.php(13): PrintNode\Request->__construct(Object(PrintNode\ApiKey))
#1 {main} thrown in /var/www/vhosts/shakepack.co.uk/vendor/printnode/printnode-php/src/PrintNode/Request.php on line 85