CodeIgniter Forums
Severity: Runtime Notice - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19)
+--- Thread: Severity: Runtime Notice (/showthread.php?tid=62985)



Severity: Runtime Notice - shany0786 - 09-14-2015

i am using this tutorial and want to do multiple image upload images are uploaded sucessfully but i am getting this error

Code:
Severity: Runtime Notice

Message: Declaration of MY_Upload::initialize() should be compatible with CI_Upload::initialize(array $config = Array)

Filename: libraries/MY_Upload.php

Line Number: 445

Backtrace:

File: C:\xampp\htdocs\ko\application\controllers\upload.php
Line: 37
Function: library

File: C:\xampp\htdocs\ko\index.php
Line: 292
Function: require_once

this is MY


RE: Severity: Runtime Notice - mwhitney - 09-14-2015

The error message is pretty straightforward. Since you are extending CI_Upload, your methods which override CI_Upload's methods should accept the same parameters as the overridden methods. In this case, your initialize() method should accept an array parameter. If you don't use it yourself, you should at least accept it and pass it to parent::initialize($config);.