Do not try to add profiling to reponses not handled by Response

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2017-01-07 15:08:26 +01:00
parent f9a27d5008
commit 4ba0eb88d7

View File

@ -864,7 +864,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
if (! defined('PMA_BYPASS_GET_INSTANCE')) {
$response = Response::getInstance();
}
if (isset($_SESSION['profiling'])) {
if (isset($response) && isset($_SESSION['profiling'])) {
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('chart.js');