News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Too few arguments to function (Profile-Modify.php)

Started by PooX, December 05, 2019, 10:44:43 AM

Previous topic - Next topic

PooX

Hello, i have problem with my forum. When i go to change my profile info, i get this error:

QuoteToo few arguments to function {closure}(), 0 passed in /var/www/prijevodi-titlovi.org/forum/Sources/Profile-Modify.php on line 795 and exactly 1 expected


Code there is:

global $profile_fields, $context, $cur_profile, $smcFunc, $txt, $cur_field;

// Make sure we have this!
loadProfileFields(true);

// First check for any linked sets.

foreach ($profile_fields as $key => $field)
if (isset($field['link_with']) && in_array($field['link_with'], $fields))
$fields[] = $key;

// Some default bits.
$context['profile_prehtml'] = '';
$context['profile_posthtml'] = '';
$context['profile_javascript'] = '';
$context['profile_onsubmit_javascript'] = '';

$i = 0;
$last_type = '';
foreach ($fields as $key => $field)
{
if (isset($profile_fields[$field]))
{
// Shortcut.
$cur_field = &$profile_fields[$field];

// Does it have a preload and does that preload succeed?
if (isset($cur_field['preload']) && !$cur_field['preload']())
continue;

// If this is anything but complex we need to do more cleaning!
if ($cur_field['type'] != 'callback' && $cur_field['type'] != 'hidden')
{
if (!isset($cur_field['label']))
$cur_field['label'] = isset($txt[$field]) ? $txt[$field] : $field;

// Everything has a value!
if (!isset($cur_field['value']))
{
$cur_field['value'] = isset($cur_profile[$field]) ? $cur_profile[$field] : '';
}

// Any input attributes?
$cur_field['input_attr'] = !empty($cur_field['input_attr']) ? implode(',', $cur_field['input_attr']) : '';
}

// Was there an error with this field on posting?
if (isset($context['profile_errors'][$field]))
$cur_field['is_error'] = true;

// Any javascript stuff?
if (!empty($cur_field['js_submit']))
$context['profile_onsubmit_javascript'] .= $cur_field['js_submit'];
if (!empty($cur_field['js']))
$context['profile_javascript'] .= $cur_field['js'];

// Any template stuff?
if (!empty($cur_field['prehtml']))
$context['profile_prehtml'] .= $cur_field['prehtml'];
if (!empty($cur_field['posthtml']))
$context['profile_posthtml'] .= $cur_field['posthtml'];

// Finally put it into context?
if ($cur_field['type'] != 'hidden')
{
$last_type = $cur_field['type'];
$context['profile_fields'][$field] = &$profile_fields[$field];
}
}
// Bodge in a line break - without doing two in a row ;)
elseif ($field == 'hr' && $last_type != 'hr' && $last_type != '')
{
$last_type = 'hr';
$context['profile_fields'][$i++]['type'] = 'hr';
}
}

// Free up some memory.
unset($profile_fields);



Forum is running at 7.2 PHP version.

vbgamer45

Can you attach your file. Looks modified from 2.0.15? What version are you running?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: