TypeError: PDOStatement::fetchAll(): Argument #2 must be of type int, string given.

Created on 22 July 2022, over 2 years ago
Updated 8 August 2022, over 2 years ago

After updating php version to 8.0 we are seeing below issue

TypeError: PDOStatement::fetchAll(): Argument #2 must be of type int, string given in PDOStatement->fetchAll() (line 300 of /var/www/docroot/core/lib/Drupal/Core/Database/StatementWrapper.php).

PDOStatement->fetchAll(7, 'sid') (Line: 300)
Drupal\Core\Database\StatementWrapper->fetchAll(7, 'sid') (Line: 166)
Drupal\Core\Database\StatementWrapper->fetchCol('sid') (Line: 61)
Drupal\learnosity\LearnositySessionHandler->getUserSessionId('1ab2edba-7243-4b54-bf74-1cb861e91fdb') (Line: 83)
Drupal\learnosity\LearnositySessionHandler->init('1ab2edba-7243-4b54-bf74-1cb861e91fdb') (Line: 62)
Drupal\learnosity\Element\LearnosityAssessmentItem::preRenderLearnosityAssessmentPlayer(Array)
call_user_func_array(Array, Array) (Line: 101)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725 ', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 772)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 363)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array) (Line: 479)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 70)
__TwigTemplate_f7b04a79e5255df649e556f6f877058275a90b921d53c72b39484edeef52242a->doDisplay(Array, Array) (Line: 405)

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India sreenivasparuchuri

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States druper

    Sorry to raise a three year old thread from the dead, just to say thank you. But, thank you. This totally saved my butt on a different module.

Production build 0.71.5 2024