Make the PDO object cast nulls to empty strings to work around PHP retardedness

develop
Sven Slootweg 12 years ago
parent f14f916017
commit 7b4b4231db

@ -45,6 +45,7 @@ if(!empty($cphp_config->database->driver))
try try
{ {
$database = new CachedPDO("mysql:host={$cphp_config->database->hostname};dbname={$cphp_config->database->database}", $cphp_config->database->username, $cphp_config->database->password); $database = new CachedPDO("mysql:host={$cphp_config->database->hostname};dbname={$cphp_config->database->database}", $cphp_config->database->username, $cphp_config->database->password);
$database->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_TO_STRING);
$cphp_mysql_connected = true; $cphp_mysql_connected = true;
} }
catch (Exception $e) catch (Exception $e)

Loading…
Cancel
Save