[-] CORE : Remove notices on ob clean
This commit is contained in:
1 parent
ddf00b3e98
commit
8370c18fe8
11 files changed
+21
-12
No files matched your search
@@ -602,7 +602,8 @@
|
|||||||
ob_start();
|
ob_start();
|
||||||
phpinfo();
|
phpinfo();
|
||||||
$buffer = ob_get_contents();
|
$buffer = ob_get_contents();
|
||||||
ob_end_clean();
|
if (ob_get_level() && ob_get_length() > 0)
|
||||||
|
ob_end_clean();
|
||||||
foreach (explode("\n", $buffer) as $line) {
|
foreach (explode("\n", $buffer) as $line) {
|
||||||
$line = array_map('trim', (explode('|', strip_tags(str_replace('</td>', '|', $line)))));
|
$line = array_map('trim', (explode('|', strip_tags(str_replace('</td>', '|', $line)))));
|
||||||
if (isset($gd[$line[0]])) {
|
if (isset($gd[$line[0]])) {
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ if ($fp === false)
|
|||||||
header('Content-Type: '.$contentType);
|
header('Content-Type: '.$contentType);
|
||||||
header('Content-Disposition: attachment; filename="'.Tools::getValue('filename'). '"');
|
header('Content-Disposition: attachment; filename="'.Tools::getValue('filename'). '"');
|
||||||
|
|
||||||
ob_clean();
|
if (ob_get_level() && ob_get_length() > 0)
|
||||||
|
ob_clean();
|
||||||
$ret = @fpassthru($fp);
|
$ret = @fpassthru($fp);
|
||||||
|
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|||||||
@@ -544,7 +544,8 @@ function runAdminTab($tab, $ajaxMode = false)
|
|||||||
if($ajaxMode)
|
if($ajaxMode)
|
||||||
{
|
{
|
||||||
// If this is an XSS attempt, then we should only display a simple, secure page
|
// If this is an XSS attempt, then we should only display a simple, secure page
|
||||||
ob_clean();
|
if (ob_get_level() && ob_get_length() > 0)
|
||||||
|
ob_clean();
|
||||||
|
|
||||||
// ${1} in the replacement string of the regexp is required, because the token may begin with a number and mix up with it (e.g. $17)
|
// ${1} in the replacement string of the regexp is required, because the token may begin with a number and mix up with it (e.g. $17)
|
||||||
$url = preg_replace('/([&?]token=)[^&]*(&.*)?$/', '${1}'.$adminObj->token.'$2', $_SERVER['REQUEST_URI']);
|
$url = preg_replace('/([&?]token=)[^&]*(&.*)?$/', '${1}'.$adminObj->token.'$2', $_SERVER['REQUEST_URI']);
|
||||||
@@ -559,7 +560,8 @@ function runAdminTab($tab, $ajaxMode = false)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If this is an XSS attempt, then we should only display a simple, secure page
|
// If this is an XSS attempt, then we should only display a simple, secure page
|
||||||
ob_clean();
|
if (ob_get_level() && ob_get_length() > 0)
|
||||||
|
ob_clean();
|
||||||
|
|
||||||
// ${1} in the replacement string of the regexp is required, because the token may begin with a number and mix up with it (e.g. $17)
|
// ${1} in the replacement string of the regexp is required, because the token may begin with a number and mix up with it (e.g. $17)
|
||||||
$url = preg_replace('/([&?]token=)[^&]*(&.*)?$/', '${1}'.$adminObj->token.'$2', $_SERVER['REQUEST_URI']);
|
$url = preg_replace('/([&?]token=)[^&]*(&.*)?$/', '${1}'.$adminObj->token.'$2', $_SERVER['REQUEST_URI']);
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ abstract class ModuleGraphCore extends Module
|
|||||||
|
|
||||||
protected function _displayCsv()
|
protected function _displayCsv()
|
||||||
{
|
{
|
||||||
if (ob_get_length())
|
if (ob_get_level() && ob_get_length() > 0)
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
header('Content-Type: application/octet-stream');
|
header('Content-Type: application/octet-stream');
|
||||||
header('Content-Disposition: attachment; filename="'.$this->displayName.' - '.time().'.csv"');
|
header('Content-Disposition: attachment; filename="'.$this->displayName.' - '.time().'.csv"');
|
||||||
|
|||||||
@@ -164,7 +164,8 @@ abstract class ModuleGridCore extends Module
|
|||||||
|
|
||||||
protected function _displayCsv()
|
protected function _displayCsv()
|
||||||
{
|
{
|
||||||
ob_end_clean();
|
if (ob_get_level() && ob_get_length() > 0)
|
||||||
|
ob_end_clean();
|
||||||
header('Content-Type: application/octet-stream');
|
header('Content-Type: application/octet-stream');
|
||||||
header('Content-Disposition: attachment; filename="'.$this->displayName.' - '.time().'.csv"');
|
header('Content-Disposition: attachment; filename="'.$this->displayName.' - '.time().'.csv"');
|
||||||
echo $this->_csv;
|
echo $this->_csv;
|
||||||
|
|||||||
@@ -464,7 +464,8 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
|||||||
if (!$extension || !Validate::isFileName($filename))
|
if (!$extension || !Validate::isFileName($filename))
|
||||||
die(Tools::displayError());
|
die(Tools::displayError());
|
||||||
|
|
||||||
ob_end_clean();
|
if (ob_get_level() && ob_get_length() > 0)
|
||||||
|
ob_end_clean();
|
||||||
header('Content-Type: '.$extension);
|
header('Content-Type: '.$extension);
|
||||||
header('Content-Disposition:attachment;filename="'.$filename.'"');
|
header('Content-Disposition:attachment;filename="'.$filename.'"');
|
||||||
readfile(_PS_UPLOAD_DIR_.$filename);
|
readfile(_PS_UPLOAD_DIR_.$filename);
|
||||||
|
|||||||
@@ -3120,7 +3120,8 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$mimeType = $mimeTypes[$bName];
|
$mimeType = $mimeTypes[$bName];
|
||||||
else
|
else
|
||||||
$mimeType = 'application/octet-stream';
|
$mimeType = 'application/octet-stream';
|
||||||
if (ob_get_level())
|
|
||||||
|
if (ob_get_level() && ob_get_length() > 0)
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
header('Content-Transfer-Encoding: binary');
|
header('Content-Transfer-Encoding: binary');
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class AttachmentControllerCore extends FrontController
|
|||||||
|
|
||||||
Hook::exec('actionDownloadAttachment', array('attachment' => &$a);
|
Hook::exec('actionDownloadAttachment', array('attachment' => &$a);
|
||||||
|
|
||||||
if (ob_get_level())
|
if (ob_get_level() && ob_get_length() > 0)
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
header('Content-Transfer-Encoding: binary');
|
header('Content-Transfer-Encoding: binary');
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ class GetFileControllerCore extends FrontController
|
|||||||
$mimeType = 'application/octet-stream';
|
$mimeType = 'application/octet-stream';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ob_get_level())
|
if (ob_get_level() && ob_get_length() > 0)
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
/* Set headers for download */
|
/* Set headers for download */
|
||||||
|
|||||||
@@ -417,7 +417,8 @@ abstract class InstallControllerHttp
|
|||||||
if ($get_output)
|
if ($get_output)
|
||||||
{
|
{
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
if (ob_get_level() && ob_get_length() > 0)
|
||||||
|
ob_end_clean();
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,4 +40,5 @@ require_once(_PS_ROOT_DIR_.'/config/smarty.config.inc.php');
|
|||||||
$smarty->setTemplateDir($directory);
|
$smarty->setTemplateDir($directory);
|
||||||
ob_start();
|
ob_start();
|
||||||
$smarty->compileAllTemplates('.tpl', false);
|
$smarty->compileAllTemplates('.tpl', false);
|
||||||
ob_end_clean();
|
if (ob_get_level() && ob_get_length() > 0)
|
||||||
|
ob_end_clean();
|
||||||
Reference in new issue
Block a user