Changeset 47238


Ignore:
Timestamp:
Feb 24, 2009, 1:40:30 AM (11 years ago)
Author:
blb@…
Message:

www/includes/common.inc - don't experience fatal error when mysql is
unavailable, ticket #17069

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/includes/common.inc

    r43737 r47238  
    7373    $script = basename($_SERVER['PHP_SELF']);
    7474   
    75     $portsdb_connection = mysql_connect($portsdb_host, $portsdb_user, $portsdb_passwd);
     75    $portsdb_connection = FALSE;
     76    if (function_exists('mysql_connect')) {
     77        $portsdb_connection = mysql_connect($portsdb_host, $portsdb_user, $portsdb_passwd);
     78    }
    7679    if ($portsdb_connection === FALSE) {
    7780        switch ($script) {
Note: See TracChangeset for help on using the changeset viewer.