Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Uploading profile image bug: PHP Notice: Undefined index: channels in /qa-include/qa-util-image.php on line 72

+1 vote
asked Feb 21, 2012 in Q2A Core by q2apro
After uploading an image to the profile, the following error message appears:

PHP Notice:  Undefined index:  channels in /qa-include/qa-util-image.php on line 72


Line 72 is:
// memory to load original image


1 Answer

+1 vote
answered Feb 22, 2012 by gidgreen
This appears to be a PHP bug - the documentation promises these elements will always be in the array, but in fact they can sometimes be absent. I'll look into fixing this for Q2A 1.5.1.
commented Mar 8, 2012 by gidgreen
If you want to make the email not editable, just change this in qa-page-account.php:


... to ...


You can then give the email field a type of 'static'.
commented Mar 8, 2012 by q2apro
very good. Tested it, now changing the avatars works without any error message.

Thank you a lot!

PS: The only thing left is the undefined index bug posted in the original question according to my error.log ;)