• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Usage of some deprecated methods

#1
Hi,
I am not sure if this is the correct sub-forum. If it is not, please tell me where is the correct place.

I am using PHP 7.0.9 with the latest release of CI (3.1.0)

I added a hook for error handling:
PHP Code:
set_error_handler('exceptions_error_handler'); 

And the first time I run something, it gives me this message:

Quote:{
"status": false
"type": "deprecated"
"data": 
{
"filename": "...\system\core\CodeIgniter.php"
"line": 249
"message": "ini_set(): Use of mbstring.internal_encoding is deprecated"
}
}


Fine, So I added "allowed errors", because I don't wanna ignore all deprecation:
PHP Code:
    $allowed = [
        
"ini_set(): Use of mbstring.internal_encoding is deprecated"    
        
];
    foreach (
$allowed as $a)
        if (
$message == $a)
            return; 

So now it gave me:
Quote:{
"status": false
"type": "deprecated"
"data": 
{
"filename": "...\system\core\CodeIgniter.php"
"line": 266
"message": "ini_set(): Use of iconv.internal_encoding is deprecated"
}
}

So now my allowed methods array looks like this:
PHP Code:
$allowed = [
        
"ini_set(): Use of mbstring.internal_encoding is deprecated",
        
"ini_set(): Use of iconv.internal_encoding is deprecated",
    ]; 

And it works.



These two were deprecated in 5.6.0
Solutions are:
mbstring - http://php.net/manual/en/mbstring.config...l-encoding
iconv - http://php.net/manual/en/iconv.configura...l-encoding
Reply

#2
It's telling you not to use those but to use the DEFAULT CHARACTER SET UTF-8

A lot of them were removed in PHP 7.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
Well OK, I am not using those.. They are used in "system\core\CodeIgniter.php" (CI 3.1.0)
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.