From 2c798ff57d7e664a7cf2327e007257f7f2a2b0e9 Mon Sep 17 00:00:00 2001 From: sminnee Date: Wed, 13 Oct 2010 04:28:45 +0000 Subject: [PATCH] BUGFIX Installer should check for DOMDocument (DOM/XML extension for PHP), as it's required to be there for sapphire to operate correctly (from r103471) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/trunk@112228 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- install.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/install.php b/install.php index 403c9ee..824499a 100644 --- a/install.php +++ b/install.php @@ -362,6 +362,7 @@ class InstallRequirements { // Check for XML support $this->requireFunction('xml_set_object', array("PHP Configuration", "XML support", "XML support not included in PHP.")); + $this->requireClass('DOMDocument', array("PHP Configuration", "DOM/XML support", "DOM/XML support not included in PHP.")); // Check for token_get_all $this->requireFunction('token_get_all', array("PHP Configuration", "PHP Tokenizer", "PHP tokenizer support not included in PHP.")); @@ -492,7 +493,13 @@ class InstallRequirements { if(!function_exists($funcName)) $this->error($testDetails); else return true; } - + + function requireClass($className, $testDetails) { + $this->testing($testDetails); + if(!class_exists($className)) $this->error($testDetails); + else return false; + } + /** * Require that the given class doesn't exist */