prevent the remaining ob_clean related errors
This commit is contained in:
parent
77378fa189
commit
595b13f1e0
|
@ -63,7 +63,7 @@ if (isset($_POST['admin_export'])) {
|
||||||
header("Content-Type: application/zip");
|
header("Content-Type: application/zip");
|
||||||
header("Content-Disposition: attachment; filename=" . basename($filename));
|
header("Content-Disposition: attachment; filename=" . basename($filename));
|
||||||
header("Content-Length: " . filesize($filename));
|
header("Content-Length: " . filesize($filename));
|
||||||
ob_end_clean();
|
@ob_end_clean();
|
||||||
readfile($filename);
|
readfile($filename);
|
||||||
unlink($filename);
|
unlink($filename);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -90,7 +90,7 @@ class getID3_cached_dbm extends getID3
|
||||||
ob_start(); // nasty, buy the only way to check...
|
ob_start(); // nasty, buy the only way to check...
|
||||||
phpinfo();
|
phpinfo();
|
||||||
$contents = ob_get_contents();
|
$contents = ob_get_contents();
|
||||||
ob_end_clean();
|
@ob_end_clean();
|
||||||
if (!strstr($contents, $cache_type)) {
|
if (!strstr($contents, $cache_type)) {
|
||||||
die('PHP is not compiled --with '.$cache_type.' support, required to use DBM style cache.');
|
die('PHP is not compiled --with '.$cache_type.' support, required to use DBM style cache.');
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ class getid3_jpg
|
||||||
$ThisFileInfo['warning'][] = strip_tags($errors);
|
$ThisFileInfo['warning'][] = strip_tags($errors);
|
||||||
unset($ThisFileInfo['jpg']['exif']);
|
unset($ThisFileInfo['jpg']['exif']);
|
||||||
}
|
}
|
||||||
ob_end_clean();
|
@ob_end_clean();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ class getid3_write_id3v2
|
||||||
} else {
|
} else {
|
||||||
$this->errors[] = 'Could not open '.$this->filename.' mode "r+b" - '.strip_tags(ob_get_contents());
|
$this->errors[] = 'Could not open '.$this->filename.' mode "r+b" - '.strip_tags(ob_get_contents());
|
||||||
}
|
}
|
||||||
ob_end_clean();
|
@ob_end_clean();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ class getid3_write_id3v2
|
||||||
} else {
|
} else {
|
||||||
$this->errors[] = 'Could not open '.$this->filename.' mode "wb" - '.strip_tags(ob_get_contents());
|
$this->errors[] = 'Could not open '.$this->filename.' mode "wb" - '.strip_tags(ob_get_contents());
|
||||||
}
|
}
|
||||||
ob_end_clean();
|
@ob_end_clean();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ class getid3_write_id3v2
|
||||||
fclose($fp_source);
|
fclose($fp_source);
|
||||||
copy($tempfilename, $this->filename);
|
copy($tempfilename, $this->filename);
|
||||||
unlink($tempfilename);
|
unlink($tempfilename);
|
||||||
ob_end_clean();
|
@ob_end_clean();
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -121,7 +121,7 @@ class getid3_write_id3v2
|
||||||
$this->errors[] = 'Could not open '.$this->filename.' mode "rb" - '.strip_tags(ob_get_contents());
|
$this->errors[] = 'Could not open '.$this->filename.' mode "rb" - '.strip_tags(ob_get_contents());
|
||||||
|
|
||||||
}
|
}
|
||||||
ob_end_clean();
|
@ob_end_clean();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ class getid3_write_real
|
||||||
$this->errors[] = 'Could not open '.$tempfilename.' mode "wb" - '.strip_tags(ob_get_contents());
|
$this->errors[] = 'Could not open '.$tempfilename.' mode "wb" - '.strip_tags(ob_get_contents());
|
||||||
|
|
||||||
}
|
}
|
||||||
ob_end_clean();
|
@ob_end_clean();
|
||||||
}
|
}
|
||||||
fclose($fp_source);
|
fclose($fp_source);
|
||||||
return false;
|
return false;
|
||||||
|
@ -275,7 +275,7 @@ class getid3_write_real
|
||||||
$this->errors[] = 'Could not open '.$tempfilename.' mode "wb" - '.strip_tags(ob_get_contents());
|
$this->errors[] = 'Could not open '.$tempfilename.' mode "wb" - '.strip_tags(ob_get_contents());
|
||||||
|
|
||||||
}
|
}
|
||||||
ob_end_clean();
|
@ob_end_clean();
|
||||||
}
|
}
|
||||||
fclose($fp_source);
|
fclose($fp_source);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -35,7 +35,7 @@ if(!isset($_POST['action']) and isset($_GET['action'])){
|
||||||
foreach($arguments as &$argument){
|
foreach($arguments as &$argument){
|
||||||
$argument=stripslashes($argument);
|
$argument=stripslashes($argument);
|
||||||
}
|
}
|
||||||
ob_clean();
|
@ob_clean();
|
||||||
if(isset($arguments['action'])){
|
if(isset($arguments['action'])){
|
||||||
OC_Log::write('media','ampache '.$arguments['action'].' request', OC_Log::DEBUG);
|
OC_Log::write('media','ampache '.$arguments['action'].' request', OC_Log::DEBUG);
|
||||||
switch($arguments['action']){
|
switch($arguments['action']){
|
||||||
|
|
|
@ -46,6 +46,6 @@ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||||
header('Pragma: public');
|
header('Pragma: public');
|
||||||
header('Content-Length: '.OC_Filesystem::filesize($filename));
|
header('Content-Length: '.OC_Filesystem::filesize($filename));
|
||||||
|
|
||||||
ob_end_clean();
|
@ob_end_clean();
|
||||||
OC_Filesystem::readfile( $filename );
|
OC_Filesystem::readfile( $filename );
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -293,7 +293,7 @@ class OC_Template{
|
||||||
ob_start();
|
ob_start();
|
||||||
include( $this->template ); // <-- we have to use include because we pass $_!
|
include( $this->template ); // <-- we have to use include because we pass $_!
|
||||||
$data = ob_get_contents();
|
$data = ob_get_contents();
|
||||||
ob_end_clean();
|
@ob_end_clean();
|
||||||
|
|
||||||
// return the data
|
// return the data
|
||||||
return $data;
|
return $data;
|
||||||
|
@ -319,7 +319,7 @@ class OC_Template{
|
||||||
ob_start();
|
ob_start();
|
||||||
include( $this->path.$file.'.php' );
|
include( $this->path.$file.'.php' );
|
||||||
$data = ob_get_contents();
|
$data = ob_get_contents();
|
||||||
ob_end_clean();
|
@ob_end_clean();
|
||||||
|
|
||||||
// Daten zurückgeben
|
// Daten zurückgeben
|
||||||
return $data;
|
return $data;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once('../lib/base.php');
|
require_once('../lib/base.php');
|
||||||
ob_clean();
|
@ob_clean();
|
||||||
OC_OCS::handle();
|
OC_OCS::handle();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -29,7 +29,7 @@ require_once('../lib/base.php');
|
||||||
OC_Util::checkAdminUser();
|
OC_Util::checkAdminUser();
|
||||||
|
|
||||||
$testCases=loadFiles(__DIR__,array('index.php','templates'));
|
$testCases=loadFiles(__DIR__,array('index.php','templates'));
|
||||||
ob_end_clean();
|
@ob_end_clean();
|
||||||
$testResults=array();
|
$testResults=array();
|
||||||
foreach($testCases as $testCaseClass){
|
foreach($testCases as $testCaseClass){
|
||||||
$testCase=new $testCaseClass();
|
$testCase=new $testCaseClass();
|
||||||
|
|
|
@ -87,7 +87,7 @@ class OC_FILEYSYSTEM_Test extends OC_TestCase
|
||||||
ob_start();
|
ob_start();
|
||||||
OC_Filesystem::readfile('/dummy');
|
OC_Filesystem::readfile('/dummy');
|
||||||
$this->assertEquals('foo', ob_get_contents(),'Unexpected output of readfile');
|
$this->assertEquals('foo', ob_get_contents(),'Unexpected output of readfile');
|
||||||
ob_end_clean();
|
@ob_end_clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isReadable(){
|
public function isReadable(){
|
||||||
|
|
Loading…
Reference in New Issue