From 732250cb5568dcc31e0056a887c582c91f0dc48d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 2 Jul 2015 15:01:43 +0200 Subject: php-tecnickcom-tc-lib-pdf-parser: fir php < 5.5 compat --- .../php-tecnickcom-tc-lib-pdf-parser-pr2.patch | 22 ++++++++++++++++++++++ .../php-tecnickcom-tc-lib-pdf-parser.spec | 6 +++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 php-tecnickcom-tc-lib-pdf-parser/php-tecnickcom-tc-lib-pdf-parser-pr2.patch (limited to 'php-tecnickcom-tc-lib-pdf-parser') diff --git a/php-tecnickcom-tc-lib-pdf-parser/php-tecnickcom-tc-lib-pdf-parser-pr2.patch b/php-tecnickcom-tc-lib-pdf-parser/php-tecnickcom-tc-lib-pdf-parser-pr2.patch new file mode 100644 index 0000000..0242702 --- /dev/null +++ b/php-tecnickcom-tc-lib-pdf-parser/php-tecnickcom-tc-lib-pdf-parser-pr2.patch @@ -0,0 +1,22 @@ +From b8e3ae24efd9f59f78863ca28715df0f9e73fefe Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Thu, 2 Jul 2015 14:59:30 +0200 +Subject: [PATCH] Fix PHP < 5.5 compatibility + +--- + src/Parser.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Parser.php b/src/Parser.php +index cddba0b..ac3b3ed 100644 +--- a/src/Parser.php ++++ b/src/Parser.php +@@ -65,7 +65,7 @@ class Parser extends \Com\Tecnick\Pdf\Parser\Process\Xref + public function __construct($cfg = array()) + { + if (isset($cfg['ignore_filter_errors'])) { +- $this->cfg['ignore_filter_errors'] = boolval($cfg['ignore_filter_errors']); ++ $this->cfg['ignore_filter_errors'] = ($cfg['ignore_filter_errors'] ? true : false); + } + } + diff --git a/php-tecnickcom-tc-lib-pdf-parser/php-tecnickcom-tc-lib-pdf-parser.spec b/php-tecnickcom-tc-lib-pdf-parser/php-tecnickcom-tc-lib-pdf-parser.spec index cc99c7a..96ad021 100644 --- a/php-tecnickcom-tc-lib-pdf-parser/php-tecnickcom-tc-lib-pdf-parser.spec +++ b/php-tecnickcom-tc-lib-pdf-parser/php-tecnickcom-tc-lib-pdf-parser.spec @@ -25,6 +25,7 @@ URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{?gh_short}.tar.gz Patch0: %{name}-pr1.patch +Patch1: %{name}-pr2.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -60,6 +61,7 @@ The initial source code has been extracted from TCPDF (http://www.tcpdf.org). %setup -q -n %{gh_project}-%{gh_commit} %patch0 -p1 +%patch1 -p1 : Sanity check grep -q '^%{version}$' VERSION @@ -116,4 +118,6 @@ rm -rf %{buildroot} * Thu Jul 2 2015 Remi Collet - 2.1.0-1 - initial package, version 2.1.0 - open https://github.com/tecnickcom/tc-lib-pdf-parser/pull/1 - fix autoloader \ No newline at end of file + fix autoloader +- open https://github.com/tecnickcom/tc-lib-pdf-parser/pull/2 + php < 5.5 compatibility -- cgit