make CLI check compatible to PHP internal server
This commit is contained in:
parent
66ff1aa732
commit
d835b64fe3
@ -304,7 +304,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
if (ob_get_contents()) {
|
if (ob_get_contents()) {
|
||||||
$oPdf->pdf->Error('Some data has already been output, can\'t send PDF file');
|
$oPdf->pdf->Error('Some data has already been output, can\'t send PDF file');
|
||||||
}
|
}
|
||||||
if (php_sapi_name() != 'cli') {
|
if (substr(php_sapi_name(), 0, 3) != 'cli') {
|
||||||
//We send to a browser
|
//We send to a browser
|
||||||
header('Content-Type: text/html');
|
header('Content-Type: text/html');
|
||||||
if (headers_sent()) {
|
if (headers_sent()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user