From 61a147546def2aaee24e723d5a78cb7afbc31331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Bartus?= Date: Sat, 30 Jul 2016 13:04:39 +0200 Subject: [ticket/14633] Check for XML extension support on install PHPBB3-14633 --- .../requirements/task/check_server_environment.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'phpBB/phpbb/install') diff --git a/phpBB/phpbb/install/module/requirements/task/check_server_environment.php b/phpBB/phpbb/install/module/requirements/task/check_server_environment.php index 62485a2097..29f9777747 100644 --- a/phpBB/phpbb/install/module/requirements/task/check_server_environment.php +++ b/phpBB/phpbb/install/module/requirements/task/check_server_environment.php @@ -71,6 +71,9 @@ class check_server_environment extends \phpbb\install\task_base // Check for JSON support $this->check_json(); + // XML extension support check + $this->check_xml(); + // Check for dbms support $this->check_available_dbms(); @@ -154,6 +157,22 @@ class check_server_environment extends \phpbb\install\task_base $this->set_test_passed(false); } + /** + * Checks whether or not the XML PHP extension is available (Required by the text formatter) + */ + protected function check_xml() + { + if (class_exists('DOMDocument')) + { + $this->set_test_passed(true); + return; + } + + $this->response_helper->add_error_message('PHP_XML_SUPPORT', 'PHP_XML_SUPPORT_EXPLAIN'); + + $this->set_test_passed(false); + } + /** * Check if any supported DBMS is available */ -- cgit v1.2.1