From aeb266d0a0db6d86d348016d88f5b91fefc2c794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 7 Feb 2013 11:29:51 +0100 Subject: [PATCH] Check if COM class is supported before using it (bug #3762) --- libraries/sysinfo.lib.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libraries/sysinfo.lib.php b/libraries/sysinfo.lib.php index a43c8b64d1..fc8d392b42 100644 --- a/libraries/sysinfo.lib.php +++ b/libraries/sysinfo.lib.php @@ -116,9 +116,13 @@ class PMA_SysInfoWinnt extends PMA_SysInfo */ public function __construct() { - // initialize the wmi object - $objLocator = new COM('WbemScripting.SWbemLocator'); - $this->_wmi = $objLocator->ConnectServer(); + if (!class_exists('COM')) { + $this->_wmi = null; + } else { + // initialize the wmi object + $objLocator = new COM('WbemScripting.SWbemLocator'); + $this->_wmi = $objLocator->ConnectServer(); + } } /**