Open daniyals opened 9 years ago
I would assume (or at least hope) that Codeigniter 3 has multi-upload ability built it. I would also assume that Codeigniter 3 is going to break a lot of libraries, such as this CodeIgnite-Multi-Upload.
I am getting this error when I tried to upload file:
Severity: Runtime Notice
Message: Declaration of MY_Upload::initialize() should be compatible with CI_Upload::initialize(array $config = Array, $reset = true)
Filename: libraries/MY_Upload.php
Line Number: 444
Please guide us that how can we resolve this issue?
@ayyazzafar are you using CodeIgniter 2 or 3?
I modify a new version support "CodeIgniter 3"
Solution for Codeigniter 3
Open MY_Upload.php around line 32 replace with;
public function initialize(array $config = array(), $reset = TRUE){
then change line 385 to
$this->file_name = sanitize_filename($this->file_name);
Remember to load
$this->load->helper('security');
in your Controller
In My_upload.php file replace the line 385 by the following code
//Sanitize the file name for security. $this->file_name = sanitize_filename($this->file_name);
// Sanitize the file name for security $this->file_name = $this->_CI->security->sanitize_filename($this->file_name);
Getting this message running Codeigniter 3.0.0 RC3
Declaration of MY_Upload::initialize() should be compatible with CI_Upload::initialize(array $config = Array, $reset = true)