mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-03-09 10:38:56 -04:00
Remove magic quotes check in dompdf helper (#2996)
This commit is contained in:
@@ -7,22 +7,10 @@
|
||||
function create_pdf($html, $filename = '')
|
||||
{
|
||||
// need to enable magic quotes for the
|
||||
$magic_quotes_enabled = get_magic_quotes_runtime();
|
||||
|
||||
if(!$magic_quotes_enabled)
|
||||
{
|
||||
ini_set('magic_quotes_runtime', TRUE);
|
||||
}
|
||||
|
||||
$dompdf = new Dompdf\Dompdf();
|
||||
$dompdf->loadHtml(str_replace(array("\n", "\r"), '', $html));
|
||||
$dompdf->render();
|
||||
|
||||
if(!$magic_quotes_enabled)
|
||||
{
|
||||
ini_set('magic_quotes_runtime', $magic_quotes_enabled);
|
||||
}
|
||||
|
||||
|
||||
if($filename != '')
|
||||
{
|
||||
$dompdf->stream($filename . '.pdf');
|
||||
|
||||
Reference in New Issue
Block a user