PHP Classes

bug

Recommend this page to a friend!

      PHP Image Operations  >  All threads  >  bug  >  (Un) Subscribe thread alerts  
Subject:bug
Summary:uploadedFile array name error?
Messages:2
Author:OSWALDO OLEA
Date:2016-05-06 09:34:53
 

  1. bug   Reply   Report abuse  
Picture of OSWALDO OLEA OSWALDO OLEA - 2016-05-06 09:34:53
I tried the test file and got error 'Invalid type of Image' until I changed in
file: ImageOperations.pph
line: 35
from: $this->img = @imagecreatefromjpeg($this->uploadedFile["tmp_name"]);
to: $this->img = @imagecreatefromjpeg($this->uploadedFile["userfile"]["tmp_name"]);

now it works.
how comes?

  2. Re: bug   Reply   Report abuse  
Picture of vinaykant sahu vinaykant sahu - 2016-05-06 09:50:15 - In reply to message 1 from OSWALDO OLEA
Thanks for the notify.
Please do not change in class file, just pass
$imageObj = new ImageOperations($_FILES['userfile']);
in test.php line 6.