From 313d63ad8f8d53d953df22a97f435964841cddf0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 9 May 2013 18:29:28 +0200 Subject: [PATCH] fix compat with tcpdf >= 6.0 (tested with 6.0.012) --- libraries/PDF.class.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libraries/PDF.class.php b/libraries/PDF.class.php index d11a9d4e9b..fa4b48ac02 100644 --- a/libraries/PDF.class.php +++ b/libraries/PDF.class.php @@ -45,7 +45,6 @@ class PMA_PDF extends TCPDF ) { parent::__construct(); $this->SetAuthor('phpMyAdmin ' . PMA_VERSION); - $this->AliasNbPages(); $this->AddFont('DejaVuSans', '', 'dejavusans.php'); $this->AddFont('DejaVuSans', 'B', 'dejavusansb.php'); $this->SetFont(PMA_PDF_FONT, '', 14); @@ -72,6 +71,17 @@ class PMA_PDF extends TCPDF } } + /** + * Function to test an empty string (was in tcpdf < 6.0) + * + * @param string $str to test + * + * @return boolean + */ + public function empty_string($str) { + return (is_null($str) OR (is_string($str) AND (strlen($str) == 0))); + } + /** * Function to set alias which will be expanded on page rendering. *