1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-25 06:39:48 +03:00

Refactor JavaScriptMessagesController controller

- Removes the dependency of the cfg and theme PHP globals.
- Handles the errors when encoding the messages to JSON.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth
2022-02-14 18:09:57 -03:00
parent 835b9b356d
commit a0337bf220
5 changed files with 31 additions and 29 deletions

View File

@@ -21,10 +21,6 @@ class JavaScriptMessagesControllerTest extends TestCase
{
public function testIndex(): void
{
global $cfg;
$cfg['GridEditing'] = 'double-click';
ob_start();
(new JavaScriptMessagesController())();
$actual = ob_get_contents();