From 69ec2c12c95ee34a4ce5df3a952efda20eec1f82 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Mon, 10 May 2010 23:47:44 +0000 Subject: [PATCH] BUGFIX Fixed error when mssql functions not available --- code/MSSQLDatabase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/MSSQLDatabase.php b/code/MSSQLDatabase.php index 801dd41..5a426c5 100644 --- a/code/MSSQLDatabase.php +++ b/code/MSSQLDatabase.php @@ -226,7 +226,7 @@ class MSSQLDatabase extends SS_Database { Debug::message("\n$sql\n{$endtime}ms\n", false); } - $error = mssql_get_last_message(); + $error = function_exists('mssql_get_last_message') ? mssql_get_last_message() : ''; if(!$handle && $errorLevel) $this->databaseError("Couldn't run query ($error): $sql", $errorLevel); return new MSSQLQuery($this, $handle, $this->mssql); }