Fix error when clicking New index in sidebar

Fixes https://github.com/phpmyadmin/phpmyadmin/issues/17592

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2022-06-14 20:20:13 -03:00
parent e87d1795c9
commit d6ee05001a
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
3 changed files with 5 additions and 2 deletions

View File

@ -15,6 +15,7 @@ phpMyAdmin - ChangeLog
- issue #17577 Fix monitor charts size on RTL languages
- issue #17121 Fix password_hash function incorrectly adding single quotes to password before hashing
- issue #17586 Fix statistics not showing for empty databases
- issue #17592 Clicking on the New index link on the sidebar does not throw an error anymore
5.2.0 (2022-05-10)
- issue #16521 Upgrade Bootstrap to version 5

View File

@ -1,3 +1,4 @@
{{ include('modals/index_dialog_modal.twig') -}}
{% if not is_ajax %}
</div>
{% endif %}

View File

@ -7,6 +7,7 @@ namespace PhpMyAdmin\Tests;
use ArrayIterator;
use PhpMyAdmin\ErrorHandler;
use PhpMyAdmin\Footer;
use PhpMyAdmin\Template;
use function json_encode;
@ -124,7 +125,7 @@ class FooterTest extends AbstractTestCase
$footer = new Footer();
$footer->setAjax(true);
$this->assertEquals(
'',
(new Template())->render('modals/index_dialog_modal'),
$footer->getDisplay()
);
}
@ -163,7 +164,7 @@ class FooterTest extends AbstractTestCase
$footer = new Footer();
$footer->setMinimal();
$this->assertEquals(
" </div>\n </body>\n</html>\n",
(new Template())->render('modals/index_dialog_modal') . " </div>\n </body>\n</html>\n",
$footer->getDisplay()
);
}