Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class 'PDFMerger\exception' not found in #46

Open
dandumit opened this issue Dec 7, 2019 · 2 comments
Open

Class 'PDFMerger\exception' not found in #46

dandumit opened this issue Dec 7, 2019 · 2 comments

Comments

@dandumit
Copy link

dandumit commented Dec 7, 2019

Hello All,
I am trying to use your class, however I got this error :
PHP Fatal error: Uncaught Error: Class 'PDFMerger\exception' not found in ..

I have followed the steps and examples found.
Any ideea for this error ?
Thank you,
DAniel

@W1DJM
Copy link

W1DJM commented Feb 20, 2020

Make sure you have fPDF and FPDI loaded before you try to create an instance of \Clegginabox\PDFMerger\PDFMerger

@RigidCollision
Copy link

Did some searching and found that no class 'Exception' exists anywhere in the code. Lots of 'extends' but no declaration.

Added the following code to the PHPMerger.php at line 216 (the bottom of the page) :

class Exception extends \Exception
{
	public function errorMessage()
	{
		return '<strong>' . htmlspecialchars($this->getMessage()) . "</strong><br />\n";
	}
}

That seems to have done the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants