Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLOB to JPG transformation broken #16585

Closed
joltcoke opened this issue Jan 20, 2021 · 1 comment · Fixed by #16586
Closed

BLOB to JPG transformation broken #16585

joltcoke opened this issue Jan 20, 2021 · 1 comment · Fixed by #16586
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
Milestone

Comments

@joltcoke
Copy link
Contributor

joltcoke commented Jan 20, 2021

Configuring a BLOB column to have browser transformation set to Inline JPG and clicking on the (also broken) thumbnail will result in the following warning:

Fatal error: Uncaught TypeError: Argument 1 passed to PhpMyAdmin\Core::downloadHeader() must be of the type string, null given, called in /var/www/html/transformation_wrapper.php on line 131 and defined in /var/www/html/libraries/classes/Core.php:631 Stack trace:
#0 /var/www/html/transformation_wrapper.php(131): PhpMyAdmin\Core::downloadHeader(NULL, 'Image/JPEG')
#1 {main} thrown in /var/www/html/libraries/classes/Core.php on line 631

Open new phpMyAdmin window

Notice in ./transformation_wrapper.php#131
 Undefined variable: cn

transformation_wrapper.php is expecting "cn" to be passed on the query string, which is not the case at the moment. Manually appending &cn= fixes the issue.

@joltcoke
Copy link
Contributor Author

joltcoke commented Jan 20, 2021

            $_url_params = [
                'db'            => $this->properties['db'],
                'table'         => $meta->orgtable,
                'where_clause_sign' => Core::signSqlQuery($whereClauseMap[$row_no][$meta->orgtable]),
                'where_clause'  => $whereClauseMap[$row_no][$meta->orgtable],
                'transform_key' => $meta->orgname,
            ];

Adding 'cn' => '', to _url_params in Results.php should fix it, not sure if this is the correct fix. Happy to provide a PR if someone can confirm this is the right approach.

@williamdes williamdes linked a pull request Jan 21, 2021 that will close this issue
@williamdes williamdes added the Bug A problem or regression with an existing feature label Jan 21, 2021
@williamdes williamdes added this to the 5.1.0 milestone Jan 21, 2021
@williamdes williamdes added this to Needs triage in issues via automation Jan 21, 2021
@williamdes williamdes moved this from Needs triage to Reproduced in issues Jan 21, 2021
@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Jan 21, 2021
@williamdes williamdes self-assigned this Jan 23, 2021
williamdes added a commit that referenced this issue Jan 23, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from Reproduced to Closed Jan 24, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
issues
  
Closed
Development

Successfully merging a pull request may close this issue.

2 participants