ContestedArt
Member
Posted 4 years ago #
Hello,
I recently had an error occur after activating the plug-in...it reads as follows after I try and update a user profile (even when I do not change anything, just click update):
Warning: Invalid argument supplied for foreach() in /home1/conteste/public_html/wp-content/plugins/profile-pic/profile-pic.php on line 422
Warning: Cannot modify header information - headers already sent by (output started at /home1/conteste/public_html/wp-content/plugins/profile-pic/profile-pic.php:422) in /home1/conteste/public_html/wp-includes/pluggable.php on line 850
Any help would be greatly appreciated!
Thanks,
Chris
ContestedArt
Member
Posted 3 years ago #
I had the same probleme 5 minutes ago... anyone have a fix for this?
newportcreativegroup
Member
Posted 3 years ago #
I just got the same thing. The problem is if you don't have any options checked off for what info. you'd like to make public. Go to line 419 and change the code to this:
// store form data
if($_POST['profilepic_displayoptions']){
$raw_data = $_POST['profilepic_displayoptions'];
$reversed_data = array();
foreach ($raw_data as $key => $val) {
$reversed_data[$val] = $key;
}}
That just checks to see if there are any profile pic display options (the if part) and if there are it processes them, if not it moves along. Solved the issue for me.
Great plug in. Cheers.