I can't reproduce this one on my local ...
We can protect against it with an isset($_POST['userpicpersonal']) && in the two statements
@emanuele what do you think?
I guess the error is present when allow_external is false.
Yeah, isset on the $_POST, or include the $valid_http and $valid_https in to an:
if ($value == 'external')
since those two seem to be relevant only in this case.