From 9557dd9da8681379ba960c4ebc9fdf20621de482 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Sun, 15 Dec 2013 14:50:08 +0100 Subject: [PATCH] FIXED : "Warning: Invalid error type specified in ...\PHPWord.php on line 226" is thrown when the specified template file is not found GH-32 --- Classes/PHPWord.php | 2 +- Classes/PHPWord/Section/Footer.php | 2 +- Classes/PHPWord/Section/Header.php | 4 ++-- changelog.txt | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Classes/PHPWord.php b/Classes/PHPWord.php index cf160233..d17a2f6c 100644 --- a/Classes/PHPWord.php +++ b/Classes/PHPWord.php @@ -223,7 +223,7 @@ class PHPWord { $template = new PHPWord_Template($strFilename); return $template; } else { - trigger_error('Template file '.$strFilename.' not found.', E_ERROR); + trigger_error('Template file '.$strFilename.' not found.', E_USER_ERROR); } } } diff --git a/Classes/PHPWord/Section/Footer.php b/Classes/PHPWord/Section/Footer.php index 39115097..e54d1ea5 100644 --- a/Classes/PHPWord/Section/Footer.php +++ b/Classes/PHPWord/Section/Footer.php @@ -131,7 +131,7 @@ class PHPWord_Section_Footer { $this->_elementCollection[] = $image; return $image; } else { - trigger_error('Src does not exist or invalid image type.', E_ERROR); + trigger_error('Src does not exist or invalid image type.', E_USER_ERROR); } } diff --git a/Classes/PHPWord/Section/Header.php b/Classes/PHPWord/Section/Header.php index 6734047e..2d7af5c1 100644 --- a/Classes/PHPWord/Section/Header.php +++ b/Classes/PHPWord/Section/Header.php @@ -131,7 +131,7 @@ class PHPWord_Section_Header { $this->_elementCollection[] = $image; return $image; } else { - trigger_error('Src does not exist or invalid image type.', E_ERROR); + trigger_error('Src does not exist or invalid image type.', E_USER_ERROR); } } @@ -189,7 +189,7 @@ class PHPWord_Section_Header { $this->_elementCollection[] = $image; return $image; } else { - trigger_error('Src does not exist or invalid image type.', E_ERROR); + trigger_error('Src does not exist or invalid image type.', E_USER_ERROR); } } diff --git a/changelog.txt b/changelog.txt index 4b0e6edc..3f6f9444 100644 --- a/changelog.txt +++ b/changelog.txt @@ -24,6 +24,7 @@ Fixed in branch for release 0.7 : - Bugfix: (RomanSyroeshko) GH-34 - PHPWord_Shared_String.IsUTF8 returns FALSE for Cyrillic UTF-8 input +- Bugfix: (RomanSyroeshko) GH-32 - "Warning: Invalid error type specified in ...\PHPWord.php on line 226" is thrown when the specified template file is not found - Feature: (Progi1984) GH-1 - Implement RTF Writer - Feature: (Progi1984) GH-2 - Implement ODT Writer - Feature: (kaystrobach) - Word2007 : Add rowspan and colspan to cells