[47238] trunk/www/includes/common.inc

blb at macports.org blb at macports.org
Mon Feb 23 17:40:31 PST 2009


Revision: 47238
          http://trac.macports.org/changeset/47238
Author:   blb at macports.org
Date:     2009-02-23 17:40:30 -0800 (Mon, 23 Feb 2009)
Log Message:
-----------
www/includes/common.inc - don't experience fatal error when mysql is
unavailable, ticket #17069

Modified Paths:
--------------
    trunk/www/includes/common.inc

Modified: trunk/www/includes/common.inc
===================================================================
--- trunk/www/includes/common.inc	2009-02-24 01:33:14 UTC (rev 47237)
+++ trunk/www/includes/common.inc	2009-02-24 01:40:30 UTC (rev 47238)
@@ -72,7 +72,10 @@
 
     $script = basename($_SERVER['PHP_SELF']);
     
-    $portsdb_connection = mysql_connect($portsdb_host, $portsdb_user, $portsdb_passwd);
+    $portsdb_connection = FALSE;
+    if (function_exists('mysql_connect')) {
+        $portsdb_connection = mysql_connect($portsdb_host, $portsdb_user, $portsdb_passwd);
+    }
     if ($portsdb_connection === FALSE) {
         switch ($script) {
             case "index.php":
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090223/51be200a/attachment-0001.html>


More information about the macports-changes mailing list