Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 2c798ff57d7e664a7cf2327e007257f7f2a2b0e9 1 parent bc60d45
sminnee authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 install.php
View
9 install.php
@@ -362,6 +362,7 @@ function check() {
// 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 @@ function requireFunction($funcName, $testDetails) {
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
*/
Please sign in to comment.
Something went wrong with that request. Please try again.