Skip to content
Permalink
Browse files

Misc fixes

  • Loading branch information...
chrisgraham committed Aug 13, 2019
1 parent 1fdcfd8 commit 888a464001b0083e6023bb70e139c25875f6d744
@@ -239,7 +239,7 @@ function php_return_bytes($val)
return 0;
}
$last = strtolower($val[strlen($val) - 1]);
$_val = intval($val);
$_val = intval(preg_replace('#[^\d]#', '', $val));
switch ($last) {
// The 'G' modifier is available since PHP 5.1.0
case 'g':
@@ -524,7 +524,7 @@ function should_ignore_file($filepath, $bitmask = 0, $bitmask_defaults = 0)
// IDE projects
'clpprj' => '', // Code Lobster
'csprj' => '', // Code Lobster
'geany' => '', // Code Lobster
'geany' => '', // Geany
);
$ignore_filename_and_dir_name_patterns = array( // Case insensitive
@@ -1208,7 +1208,7 @@ function get_cookie_domain()
function get_cookie_days()
{
global $SITE_INFO;
return array_key_exists('cookie_domain', $SITE_INFO) ? intval($SITE_INFO['cookie_days']) : 120;
return array_key_exists('cookie_days', $SITE_INFO) ? intval($SITE_INFO['cookie_days']) : 120;
}
/**
@@ -933,7 +933,7 @@ public function tpl_preview__cns_member_profile_screen()
'TIME_FOR_THEM' => placeholder_date(),
'TIME_FOR_THEM_RAW' => placeholder_date_raw(),
'SUBMIT_DAYS_AGO' => lorem_phrase(),
'SUBMIT_TIME_RAW' => placeholder_date(),
'SUBMIT_TIME_RAW' => placeholder_date_raw(),
'LAST_VISIT_TIME_RAW' => placeholder_date_raw(),
'ONLINE_NOW' => lorem_phrase(),
'_ONLINE_NOW' => false,
@@ -972,7 +972,7 @@ public function tpl_preview__cns_member_profile_screen()
'MEMBER_ID' => placeholder_id(),
'SECONDARY_GROUPS' => placeholder_array(),
'VIEW_PROFILES' => true,
'ON_PROBATION' => lorem_phrase(),
'ON_PROBATION' => placeholder_date_raw(),
'USERGROUP' => lorem_word(),
'CLUBS' => lorem_phrase(),
'VIEWS' => placeholder_number(),
@@ -329,7 +329,7 @@ public function run($default_password, $use_temporary_passwords, $path)
$custom_fields[$cpf['id']] = array_key_exists($cpf['_cf_name'], $line) ? $line[$cpf['_cf_name']] : $cpf['cf_default'];
if ($cpf['cf_type'] == 'integer') {
$custom_fields[$cpf['id']] = intval($custom_fields[$cpf['id']]);
$custom_fields[$cpf['id']] = ($custom_fields[$cpf['id']] === null) ? null : @intval($custom_fields[$cpf['id']]);
} elseif ($cpf['cf_type'] == 'tick') {
$custom_fields[$cpf['id']] = ((strtoupper($custom_fields[$cpf['id']]) == 'YES' || strtoupper($custom_fields[$cpf['id']]) == 'Y' || strtoupper($custom_fields[$cpf['id']]) == 'ON' || $custom_fields[$cpf['id']] == '1') ? 1 : 0);
} elseif (($cpf['cf_type'] == 'short_text') || ($cpf['cf_type'] == 'short_trans')) {
@@ -355,7 +355,7 @@ public function run($default_password, $use_temporary_passwords, $path)
);
$custom_fields[$cpf['id']] = floatval($parts[1]) + $month_lookup[$parts[0]];
} else {
$custom_fields[$cpf['id']] = floatval($custom_fields[$cpf['id']]);
$custom_fields[$cpf['id']] = ($custom_fields[$cpf['id']] === null) ? null : @floatval($custom_fields[$cpf['id']]);
}
}
unset($line[$cpf['_cf_name']]);

0 comments on commit 888a464

Please sign in to comment.
You can’t perform that action at this time.