--- reg_with_pic.module.old 2009-04-27 07:35:30.000000000 -0500 +++ reg_with_pic.module 2009-04-27 07:36:01.000000000 -0500 @@ -35,6 +35,10 @@ function reg_with_pic_user($op, &$edit, case 'insert': // file repopulates from uploadcache $file = file_save_upload('picture_upload_register'); + if (!$file) { + break; + } + $info = image_get_info($file->filepath); // save picture to correct path and update the row in the user table $destination = variable_get('user_picture_path', 'pictures') .'/picture-'. $user->uid .'.'. $info['extension']; @@ -44,4 +48,4 @@ function reg_with_pic_user($op, &$edit, break; } } -} \ No newline at end of file +}