Well, I've just found a solution. In the book and download code, line 21 in upload_avatar.php was set like this:
Code:
if (!$_FILES['avatar']['error'])
I have now changed it to this:
Code:
if (isset($_FILES['avatar']['error']))
Everything uploads OK with no error notices. However I think something is not quite right because I realise that I have cancelled the warnings by acknowledging that the errors are set!