Merge pull request #15550 from Tithugues/feature/use-ob-get-clean

Use ob_get_clean instead of ob_get_contents + ob_end_clean
This commit is contained in:
Maurício Meneghini Fauth 2019-11-04 16:30:27 -03:00 committed by GitHub
commit 1ef43f995b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 8 deletions

View File

@ -1577,8 +1577,7 @@ class Config
$retval .= '<div id="' . $id . '">';
ob_start();
include $filename;
$retval .= ob_get_contents();
ob_end_clean();
$retval .= ob_get_clean();
$retval .= '</div>';
}
return $retval;

View File

@ -391,8 +391,7 @@ class GisVisualization
ob_start();
imagepng($img, null, 9, PNG_ALL_FILTERS);
imagedestroy($img);
$output = ob_get_contents();
ob_end_clean();
$output = ob_get_clean();
// base64 encode
$encoded = base64_encode($output);

View File

@ -33,8 +33,7 @@ if (@is_readable($filename)) {
if (substr($filename, -3) == '.gz') {
ob_start();
readgzfile($filename);
$changelog = ob_get_contents();
ob_end_clean();
$changelog = ob_get_clean();
} else {
$changelog = file_get_contents($filename);
}

View File

@ -414,8 +414,7 @@ if (isset($_GET['viewing_mode']) && $_GET['viewing_mode'] == 'db') {
$pos
) = PhpMyAdmin\Util::getDbInfo($db, $sub_part === null ? '' : $sub_part);
$content = ob_get_contents();
ob_end_clean();
$content = ob_get_clean();
$response->addHTML($content . "\n");
} elseif (! empty($GLOBALS['message'])) {
$response->addHTML(PhpMyAdmin\Util::getMessage($GLOBALS['message']));