bnomei / kirby3-qrcode

Generate QRCodes easily.
https://forum.getkirby.com/t/plugin-qr-code-field-and-page-method/6798
MIT License
12 stars 3 forks source link

Too few arguments to function Bnomei\QRCode::html() #36

Closed afbora closed 9 months ago

afbora commented 10 months ago

I tried to use sample in readme

$qrcodeObject = new \Bnomei\QRCode([
    'Text' => 'https://github.com/bnomei/kirby3-qrcode',
]);
echo $qrcodeObject->html();

And I'm getting following error:

Too few arguments to function Bnomei\QRCode::html(), 0 passed in \site\templates\home.php on line 6 and at least 1 expected

screen-capture-1747-Kirby CMS Debugger-plugins test

distantnative commented 10 months ago

@afbora don't think this is a Kirby 4 bug but just incorrect docs - this should also fail in Kirby 3 as https://github.com/bnomei/kirby3-qrcode/blob/master/classes/QRCode.php#L68 requires the $name parameter

afbora commented 10 months ago

I know. I added it to the K4 list on the principle that what doesn't work in K3 doesn't work in K4 😅