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

Error 500 field of type bit #16048

Closed
gmrfrost opened this issue Mar 27, 2020 · 3 comments · Fixed by #16063
Closed

Error 500 field of type bit #16048

gmrfrost opened this issue Mar 27, 2020 · 3 comments · Fixed by #16063
Assignees
Labels
Bug A problem or regression with an existing feature
Projects
Milestone

Comments

@gmrfrost
Copy link

Hi,

We are facing an error when trying to modify a field of type BIT.
phpMyAdmin-5.0.2-1
php73-php-common-7.3.16-1 (FPM)
Linux 4.4.217-1 #1 SMP 2020 x86_64 x86_64 x86_64 GNU/Linux
CentOS release 6.10 (Final)
Server version: Apache/2.4.34 (Red Hat) (Server MPM: event)

Trace:

PHP Fatal error:  Uncaught TypeError: htmlspecialchars_decode() expects parameter 1 to be string, null given in /usr/share/phpMyAdmin/libraries/classes/Util.php:2863
Stack trace:
#0 /usr/share/phpMyAdmin/libraries/classes/Util.php(2863): htmlspecialchars_decode(NULL, 3)
#1 /usr/share/phpMyAdmin/libraries/tbl_columns_definition_form.inc.php(339): PhpMyAdmin\Util::convertBitDefaultValue(NULL)
#2 /usr/share/phpMyAdmin/libraries/classes/Controllers/Table/StructureController.php(573): include('/usr/share/phpM...')
#3 /usr/share/phpMyAdmin/libraries/classes/Controllers/Table/StructureController.php(218): PhpMyAdmin\Controllers\Table\StructureController->displayHtmlForColumnChange(Array, 'tbl_structure.p...', Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#4 /usr/share/phpMyAdmin/tbl_structure.php(68): PhpMyAdmin\Controllers\Table\StructureController->indexAction(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#5 {main}
 thrown in /usr/share/phpMyAdmin/libraries/classes/Util.php on line 2863

Regards,

@williamdes williamdes added the Bug A problem or regression with an existing feature label Mar 27, 2020
@williamdes williamdes added this to the 5.0.3 milestone Mar 27, 2020
@williamdes williamdes added this to Needs triage in issues via automation Mar 27, 2020
@williamdes williamdes moved this from Needs triage to High priority in issues Mar 27, 2020
@ibennetch
Copy link
Member

Thanks for the report.

This affects QA_5_0, does not affect QA_4_9

@peterkroon
Copy link
Contributor

I can reproduce this only when the default value is set to NULL. When a default value has been specified then I'm able to edit the bit field.

Server version: 10.1.44-MariaDB-0+deb9u1 - Debian 9.11
nginx/1.10.3
Database client version: libmysql - mysqlnd 7.4.4
PHP version: 7.4.4
Version information: 5.0.2 (up to date)

peterkroon added a commit to peterkroon/phpmyadmin that referenced this issue Apr 3, 2020
Allow NULL as default bit value.
@williamdes williamdes linked a pull request Apr 3, 2020 that will close this issue
6 tasks
williamdes added a commit that referenced this issue Apr 3, 2020
Pull-request: #16063
Fixes: #16048
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Apr 3, 2020
Ref: #16063

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Apr 3, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from High priority to Closed Apr 3, 2020
@williamdes williamdes self-assigned this Apr 3, 2020
@williamdes
Copy link
Member

ae640eb is the fix and I added a test case aab8c19

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2021
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
Projects
issues
  
Closed
Development

Successfully merging a pull request may close this issue.

4 participants