imagecreatefromstring给出具有特定文件的通知

here's the code:

 move_uploaded_file($_FILES['photo']['tmp_name'], 'uploads/' . $full_name . '.jpg');
 $image = imagecreatefromstring(file_get_contents('uploads/' . $full_name . '.jpg'));
 //...

user can upload a file (photo) , there's no problem with uploading it
but the second line sometimes give's me this:

Notice: imagecreatefromstring(): gd-jpeg, libjpeg: recoverable error: Corrupt JPEG data: 1 extraneous bytes before marker 0xd9 in E:\xampp\htdocs... on line 20

it doesn't fail the process but it's a Notice anyway...

what's wrong?

The problem was due to my error handling. I'd set up an error handler so my call to

$image = imagecreatefromstring(file_get_contents('uploads/' . $full_name . '.jpg'));

wasn't suppressing errors.

By modifying my error handler with:

if (error_reporting() === 0){ return false; }