jsmrtn / craftagram

Grab Instagram content through the Instagram Basic Display API
Other
14 stars 8 forks source link

TypeError #56

Closed cloudgrayau closed 2 years ago

cloudgrayau commented 2 years ago

TypeError scaramangagency\craftagram\Craftagram::log(): Argument #2 ($type) must be of type int, string given, called in /Users/cloudgray/Sites/clients/craft/qlcr/vendor/scaramangagency/craftagram/src/services/CraftagramService.php on line 224

Craft 4 Seems to have occurred after Craftagram lost the connection - I believe the password on the connected Instagram account was changed.

2022-06-23 01:54:52 [web.ERROR] [TypeError] TypeError: scaramangagency\craftagram\Craftagram::log(): Argument #2 ($type) must be of type int, string given, called in /Users/cloudgray/Sites/clients/craft/qlcr/vendor/scaramangagency/craftagram/src/services/CraftagramService.php on line 224 and defined in /Users/cloudgray/Sites/clients/craft/qlcr/vendor/scaramangagency/craftagram/src/Craftagram.php:139 Stack trace:

0 /Users/cloudgray/Sites/clients/craft/qlcr/vendor/scaramangagency/craftagram/src/services/CraftagramService.php(224): scaramangagency\craftagram\Craftagram->log('Failed to get d...', 'error')

1 /Users/cloudgray/Sites/clients/craft/qlcr/vendor/scaramangagency/craftagram/src/variables/CraftagramVariable.php(34): scaramangagency\craftagram\services\CraftagramService->getInstagramFeed(10, 1, '')

2 /Users/cloudgray/Sites/clients/craft/qlcr/vendor/twig/twig/src/Extension/CoreExtension.php(1607): scaramangagency\craftagram\variables\CraftagramVariable->getInstagramFeed(10, 1)

3 /Users/cloudgray/Sites/clients/craft/qlcr/vendor/craftcms/cms/src/helpers/Template.php(101): twig_get_attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(scaramangagency\craftagram\variables\CraftagramVariable), 'getInstagramFee...', Array, 'method', false, false)

4 /Users/cloudgray/Sites/clients/craft/qlcr/storage/runtime/compiled_templates/ae/ae3757c3ee5391744dd473d3906914c0.php(188): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(scaramangagency\craftagram\variables\CraftagramVariable), 'getInstagramFee...', Array, 'method')

5 /Users/cloudgray/Sites/clients/craft/qlcr/vendor/twig/twig/src/Template.php(394): __TwigTemplate_3f1a4985c6e8d5e8d115ca2c915cd6e8->doDisplay(Array, Array)

6 /Users/cloudgray/Sites/clients/craft/qlcr/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)

7 /Users/cloudgray/Sites/clients/craft/qlcr/vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)

8 /Users/cloudgray/Sites/clients/craft/qlcr/vendor/twig/twig/src/TemplateWrapper.php(40): Twig\Template->render(Array, Array)

9 /Users/cloudgray/Sites/clients/craft/qlcr/vendor/twig/twig/src/Environment.php(277): Twig\TemplateWrapper->render(Array)

10 /Users/cloudgray/Sites/clients/craft/qlcr/vendor/craftcms/cms/src/web/View.php(414): Twig\Environment->render('craftagram/sett...', Array)

11 /Users/cloudgray/Sites/clients/craft/qlcr/vendor/craftcms/cms/src/web/View.php(467): craft\web\View->renderTemplate('craftagram/sett...', Array)

12 /Users/cloudgray/Sites/clients/craft/qlcr/vendor/craftcms/cms/src/web/TemplateResponseFormatter.php(52): craft\web\View->renderPageTemplate('craftagram/sett...', Array, 'cp')

13 /Users/cloudgray/Sites/clients/craft/qlcr/vendor/yiisoft/yii2/web/Response.php(1095): craft\web\TemplateResponseFormatter->format(Object(craft\web\Response))

14 /Users/cloudgray/Sites/clients/craft/qlcr/vendor/craftcms/cms/src/web/Response.php(286): yii\web\Response->prepare()

15 /Users/cloudgray/Sites/clients/craft/qlcr/vendor/yiisoft/yii2/web/Response.php(339): craft\web\Response->prepare()

16 /Users/cloudgray/Sites/clients/craft/qlcr/vendor/yiisoft/yii2/base/Application.php(390): yii\web\Response->send()

17 /Users/cloudgray/Sites/clients/craft/qlcr/web/index.php(12): yii\base\Application->run()

18 {main} {"memory":35797072,"exception":"[object] (TypeError(code: 0): scaramangagency\craftagram\Craftagram::log(): Argument #2 ($type) must be of type int, string given, called in /Users/cloudgray/Sites/clients/craft/qlcr/vendor/scaramangagency/craftagram/src/services/CraftagramService.php on line 224 at /Users/cloudgray/Sites/clients/craft/qlcr/vendor/scaramangagency/craftagram/src/Craftagram.php:139)"}

2022-06-23 01:54:52 [web.INFO] [application] Request context: $_GET = [ 'p' => 'backdoor/craftagram/settings/1' 'site' => '' ]

jsmrtn commented 2 years ago

Thanks mate, logging error. I've fixed this, now.