Reply to Getting All attributes Null

Getting All attributes Null new!
by klaudius, 12 years, 5 months ago
I had some issues to make this class working.
Nothing worked for me, no errors, no blank pages, no logs and no upload.

After some research, it appears that I all attributes were set to Null.
$handle = new upload($_FILES['image']);
var_dump($handle);

I got :
object(tools\upload)#147 (134) {
  ["version"]=> NULL
  ["file_src_name"]=> NULL
  ["file_src_name_body"]=> NULL
  ["file_src_name_ext"]=> NULL
  ["file_src_mime"]=> NULL
  ["file_src_size"]=> NULL
  ["file_src_error"]=> NULL
  ["file_src_pathname"]=> NULL
[...]

Solution : renaming the constructor from
upload($file, $lang = 'en_GB')
to
__construct($file, $lang = 'en_GB')

I work with PHP Version 5.3.10-1ubuntu3.1Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important