Code: Select all
[phpBB Debug] PHP Notice: in file /includes/functions_account_link.php on line 40: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3551: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2959)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3553: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2959)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3554: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2959)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3555: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2959)
Code: Select all
'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
'T_SMILIES_PATH' => "{$phpbb_root_path}{$config['smilies_path']}/",
'T_AVATAR_PATH' => "{$phpbb_root_path}{$config['avatar_path']}/",
'T_AVATAR_GALLERY_PATH' => "{$phpbb_root_path}{$config['avatar_gallery_path']}/",
'T_ICONS_PATH' => "{$phpbb_root_path}{$config['icons_path']}/",
'T_RANKS_PATH' => "{$phpbb_root_path}{$config['ranks_path']}/",
'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/",
'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$phpbb_root_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : "{$phpbb_root_path}style.$phpEx?sid=$user->session_id&id=" . $user->theme['style_id'] . '&lang=' . $user->data['user_lang'],
'T_STYLESHEET_NAME' => $user->theme['theme_name'],
'SITE_LOGO_IMG' => $user->img('site_logo'))
);
// Begin Account Link Mod
require_once($phpbb_root_path . 'includes/functions_account_link.' . $phpEx);
account_link_form ();
// End Account Link Mod
// application/xhtml+xml not used because of IE
header('Content-type: text/html; charset=UTF-8');
header('Cache-Control: private, no-cache="set-cookie"');
header('Expires: 0');
header('Pragma: no-cache');
return;
}
Code: Select all
'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
'T_SMILIES_PATH' => "{$phpbb_root_path}{$config['smilies_path']}/",
'T_AVATAR_PATH' => "{$phpbb_root_path}{$config['avatar_path']}/",
'T_AVATAR_GALLERY_PATH' => "{$phpbb_root_path}{$config['avatar_gallery_path']}/",
'T_ICONS_PATH' => "{$phpbb_root_path}{$config['icons_path']}/",
'T_RANKS_PATH' => "{$phpbb_root_path}{$config['ranks_path']}/",
'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/",
'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$phpbb_root_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : "{$phpbb_root_path}style.$phpEx?sid=$user->session_id&id=" . $user->theme['style_id'] . '&lang=' . $user->data['user_lang'],
'T_STYLESHEET_NAME' => $user->theme['theme_name'],
'SITE_LOGO_IMG' => $user->img('site_logo'))
);
// application/xhtml+xml not used because of IE
header('Content-type: text/html; charset=UTF-8');
header('Cache-Control: private, no-cache="set-cookie"');
header('Expires: 0');
header('Pragma: no-cache');
return;
// Begin Account Link Mod
require_once($phpbb_root_path . 'includes/functions_account_link.' . $phpEx);
account_link_form ();
// End Account Link Mod
}
Code: Select all
foreach($linked_accts as $key => $value)
{
if ($key != $user->data['user_id'])
{
$s_account_link_options .= '<option value="' . $key . '">' . $value . '</option>';
}
}
Code: Select all
if (count($linked_accts) > 0) {
foreach($linked_accts as $key => $value)
{
if ($key != $user->data['user_id'])
{
$s_account_link_options .= '<option value="' . $key . '">' . $value . '</option>';
}
}
}
I actually used to use Dreamweaver a lot... no fault in that.Valace wrote:Well I fixed the layout problem, just need to add it in right place... Used Dreamweaver to insert it correctly (yes cheated)
Code: Select all
// Begin Account Link Mod
require_once($phpbb_root_path . 'includes/functions_account_link.' . $phpEx);
account_link_form ();
// End Account Link Mod
Code: Select all
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3549: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2959)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3551: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2959)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3552: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2959)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3553: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2959)
Code: Select all
<!-- INCLUDE account_link_form.html -->
Code: Select all
foreach((array)$linked_accts as $key => $value)
{
if ($key != $user->data['user_id'])
{
$s_account_link_options .= '<option value="' . $key . '">' . $value . '</option>';
}
}
Due to an odd quirk in foreach, that's not true... if index 0 is not set, foreach will often still throw a warning, even though the variable is an array... that is actually still possible here, though, since I'm using the user_id as an index and nobody is linked to user 0 (guest account) I'll probably have to set id 0 and ignore it... But aside from that, I still need to declare that to prevent other warnings from creeping in...WDaquell wrote:Actually, you really only need to update the code by casting the (possibly undeclared) array to an array:
Code: Select all
<!-- INCLUDE account_link_form.html -->
Code: Select all
// application/xhtml+xml not used because of IE
header('Content-type: text/html; charset=UTF-8');
header('Cache-Control: private, no-cache="set-cookie"');
header('Expires: 0');
header('Pragma: no-cache');
Code: Select all
// Begin Account Link Mod
require_once($phpbb_root_path . 'includes/functions_account_link.' . $phpEx);
account_link_form ();
// End Account Link Mod
Code: Select all
// Begin Account Link Mod
require_once($phpbb_root_path . 'includes/functions_account_link.' . $phpEx);
account_link_form ();
// End Account Link Mod
Code: Select all
phpBB Debug] PHP Notice: in file /includes/functions_account_link.php on line 41: Invalid argument supplied for foreach()
This has removed all error messages totaly and the template/skin appears fine now.WDaquell wrote:Actually, you really only need to update the code by casting the (possibly undeclared) array to an array:
Code: Select all
foreach((array)$linked_accts as $key => $value) { if ($key != $user->data['user_id']) { $s_account_link_options .= '<option value="' . $key . '">' . $value . '</option>'; } }
Code: Select all
<!-- INCLUDE account_link_form.html -->