From b2593bc068c9c2f3c5c7d9d2a27a9a57cf9d7482 Mon Sep 17 00:00:00 2001 From: Brayan Osmar Pereyra Suxo Date: Thu, 14 Feb 2013 11:00:44 -0400 Subject: [PATCH] BUG 10746 I added a validate to pdf size SOLVED I added a validate to pdf size --- gulliver/thirdparty/html2ps_pdf/box.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gulliver/thirdparty/html2ps_pdf/box.php b/gulliver/thirdparty/html2ps_pdf/box.php index 3780e9119..2737588ff 100755 --- a/gulliver/thirdparty/html2ps_pdf/box.php +++ b/gulliver/thirdparty/html2ps_pdf/box.php @@ -88,11 +88,13 @@ function _fix_display_position_float(&$css_state) { } function &create_pdf_box(&$root, &$pipeline) { - if ( !(@function_exists($root->node_type)) ) { + if ($root != ''){ + $valueNodeType = $root->node_type(); + } else { throw new Exception("ID_OUTPUT_NOT_GENERATE", 1); } - switch ($root->node_type()) { + switch ($valueNodeType) { case XML_DOCUMENT_NODE: // TODO: some magic from traverse_dom_tree $box =& create_document_box($root, $pipeline);