Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[imaging_browser] Error 500 caused by PDO error #9349

@maximemulder

Description

@maximemulder

Describe the bug

While testing #9304 , I got a very strange PDO error (see below) on a query that did not seem to be touched by the PR. I suspect this bug was introduced by #9334 .

> SQLSTATE[HY000]: General error: 2014 Cannot execute queries while there are pending result sets. Consider unsetting the previous PDOStatement or calling PDOStatement::closeCursor()

To Reproduce

Go to the following page on your dev VM and get an error.
https://your-vm-dev.loris.ca/imaging_browser/viewSession/?sessionID=2145&backURL=/imaging_browser/

To print the PDO error, you can copy-paste this code in modules/imaging_browser/php/viewsession.class.inc line 397.

        try {
            return $this->_DB->pselectOneInt($query, ['fileID' => $fileID]);
        } catch (\Exception $e) {
            echo $e->getMessage();
            die();
        }

Metadata

Metadata

Assignees

Labels

Category: BugPR or issue that aims to report or fix a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions