Skip to content

Commit

Permalink
Fix timezone warning messages on PHP5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
haraldpdl committed Sep 11, 2010
1 parent cabd72d commit 9d69135
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions catalog/admin/includes/functions/compatibility.php
Expand Up @@ -49,6 +49,11 @@ function do_magic_quotes_gpc(&$ar) {
do_magic_quotes_gpc($HTTP_COOKIE_VARS);
}

// set default timezone if none exists (PHP 5.3 throws an E_WARNING)
if ((strlen(ini_get('date.timezone')) < 1) && function_exists('date_default_timezone_set')) {
date_default_timezone_set(@date_default_timezone_get());
}

if (!function_exists('is_numeric')) {
function is_numeric($param) {
return ereg("^[0-9]{1,50}.?[0-9]{0,50}$", $param);
Expand Down
5 changes: 5 additions & 0 deletions catalog/includes/functions/compatibility.php
Expand Up @@ -49,6 +49,11 @@ function do_magic_quotes_gpc(&$ar) {
do_magic_quotes_gpc($HTTP_COOKIE_VARS);
}

// set default timezone if none exists (PHP 5.3 throws an E_WARNING)
if ((strlen(ini_get('date.timezone')) < 1) && function_exists('date_default_timezone_set')) {
date_default_timezone_set(@date_default_timezone_get());
}

if (!function_exists('array_splice')) {
function array_splice(&$array, $maximum) {
if (sizeof($array) >= $maximum) {
Expand Down

0 comments on commit 9d69135

Please sign in to comment.