mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Log more PhantomJS failure details
This commit is contained in:
parent
5f8d8517af
commit
bb898d8f5a
@ -1237,18 +1237,21 @@ class Invoice extends EntityModel implements BalanceAffecting
|
|||||||
|
|
||||||
$pdfString = strip_tags($pdfString);
|
$pdfString = strip_tags($pdfString);
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
Utils::logError("PhantomJS - Failed to create pdf: {$exception->getMessage()}");
|
Utils::logError("PhantomJS - Failed to load: {$exception->getMessage()}");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $pdfString || strlen($pdfString) < 200) {
|
if (! $pdfString || strlen($pdfString) < 200) {
|
||||||
Utils::logError("PhantomJS - Failed to create pdf: {$pdfString}");
|
Utils::logError("PhantomJS - Invalid response: {$pdfString}");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Utils::decodePDF($pdfString);
|
if ($pdf = Utils::decodePDF($pdfString)) {
|
||||||
|
return $pdf;
|
||||||
|
} else {
|
||||||
|
Utils::logError("PhantomJS - Unable to decode: {$pdfString}");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user