diff --git a/ChangeLog b/ChangeLog index 69c09dcc2e..0514e558e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,6 +33,8 @@ phpMyAdmin - ChangeLog - issue #13864 Fix ENUM's radiobuttons reset on "Continue insertion with" changes - issue #15811 Fixed browse foreign values doesn't show a modal with grid edit - issue #15817 Fix "new table" layout issue on original theme +- issue #15798 Fixed not needed prompt before abandoning changes on SQL tab after only changing a checkbox +- issue #15833 Fix php TypeError when submitting unchanged data 5.0.1 (2020-01-07) - issue #15719 Fixed error 500 when browsing a table when $cfg['LimitChars'] used a string and not an int value diff --git a/js/ajax.js b/js/ajax.js index 1653e11543..38b4e5c578 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -151,6 +151,13 @@ var AJAX = { * @return void */ lockPageHandler: function (event) { + // don't consider checkbox event + if (typeof event.target !== 'undefined') { + if (event.target.type === 'checkbox') { + return; + } + } + var newHash = null; var oldHash = null; var lockId; diff --git a/libraries/classes/Sql.php b/libraries/classes/Sql.php index 335a098bb3..73ac5ee787 100644 --- a/libraries/classes/Sql.php +++ b/libraries/classes/Sql.php @@ -1642,7 +1642,7 @@ class Sql * @param array $analyzed_sql_results analysed sql results * @param string $db current database * @param string $table current table - * @param string|null $message message to show + * @param Message|string|null $message message to show * @param array|null $sql_data sql data * @param DisplayResults $displayResultsObject Instance of DisplayResults * @param string $pmaThemeImage uri of the theme image @@ -1782,7 +1782,7 @@ class Sql $scripts->addFile('makegrid.js'); $scripts->addFile('sql.js'); if (isset($message)) { - $message = Message::success($message); + $message = is_string($message) ? Message::success($message) : $message; $tableMaintenanceHtml = Generator::getMessage( $message, $GLOBALS['sql_query'], diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index a8b7ebc183..6c9153b502 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -2807,11 +2807,6 @@ parameters: count: 1 path: libraries/classes/Sql.php - - - message: "#^Parameter \\#5 \\$message of method PhpMyAdmin\\\\Sql\\:\\:getQueryResponseForResultsReturned\\(\\) expects string\\|null, PhpMyAdmin\\\\Message\\|string\\|null given\\.$#" - count: 1 - path: libraries/classes/Sql.php - - message: "#^Method PhpMyAdmin\\\\StorageEngine\\:\\:resolveTypeSize\\(\\) should return array but returns array\\|null\\.$#" count: 1