Welcome Guest, Not a member yet? Register   Sign In
Undefined variable: mimes
#1

Hey,

I upgrade my CI installation from 2 to 3 and got the following php notice error when opening one of my existing controllers.

Message: Undefined variable: mimes
Filename: core/Output.php
Line Number: 107

PHP Code:
function __construct()
{
 
 $this->_zlib_oc = @ini_get('zlib.output_compression');

 
 // Get mime types for later
 
 if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
 
 {
 
   include APPPATH.'config/'.ENVIRONMENT.'/mimes.php';
 
 }
 
 else
  
{
 
   include APPPATH.'config/mimes.php';
 
 }

 
 $this->mime_types $mimes;

 
 log_message('debug'"Output Class Initialized");


Could I change the following

PHP Code:
$this->mime_types $mimes

to

PHP Code:
if (isset($mimes))
{
 
 $this->mime_types $mimes;


In order to resolve the problem ?
Reply
#2

Are you sure updated correctly?
The core/Output.php constructor is a little bit different than the one you posted here:
https://github.com/bcit-ci/CodeIgniter/b...t.php#L132
Reply
#3

(11-27-2014, 12:02 PM)slax0r Wrote: Are you sure updated correctly?
The core/Output.php constructor is a little bit different than the one you posted here:
https://github.com/bcit-ci/CodeIgniter/b...t.php#L132

I had the same problem and somehow I messed up the upgrade, after I re-downloaded the files off the site and copied over the system folder again it all worked fine.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB