CC-3322: PHP warning during 2.0.1 upgrade process

-get timezone properly
This commit is contained in:
Martin Konecny 2012-02-12 01:34:10 -05:00
parent 585ae5ad20
commit ccd843a35a
1 changed files with 4 additions and 2 deletions

View File

@ -22,7 +22,9 @@ class UpgradeCommon{
{
$sql = "SELECT valstr from cc_pref WHERE keystr = 'timezone'";
$timezone = self::queryDb($sql);
$result = self::queryDb($sql);
$timezone = $result['valstr'];
date_default_timezone_set($timezone);
}
@ -245,7 +247,7 @@ class UpgradeCommon{
public static function queryDb($p_sql){
global $CC_DBC;
$result = $CC_DBC->query($p_sql);
$result = $CC_DBC->getRow($p_sql, $fetchmode=DB_FETCHMODE_ASSOC);
if (PEAR::isError($result)) {
echo "Error executing $sql. Exiting.";
exit(1);