Skip to content

Commit

Permalink
ini_get('mbstring.func_overload'): Avoid deprecation notices.
Browse files Browse the repository at this point in the history
Signed-off-by:Ivan Tcholakov <[email protected]>
  • Loading branch information
ivantcholakov committed Feb 27, 2021
1 parent 0d02912 commit dd3c9c8
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 3 deletions.
5 changes: 5 additions & 0 deletions platform/common/core/Core_Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ public function __construct()
{
$config =& get_config();

// Modified by Ivan Tcholakov, 27-FEB-2021.
//isset(self::$func_overload) OR self::$func_overload = (extension_loaded('mbstring') && ini_get('mbstring.func_overload'));
isset(self::$func_overload) OR self::$func_overload = (defined('MB_OVERLOAD_STRING') && ((int) @ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING));
//

$this->_log_path = ($config['log_path'] !== '') ? $config['log_path'] : APPPATH.'logs/';
file_exists($this->_log_path) OR mkdir($this->_log_path, DIR_WRITE_MODE, TRUE);
$this->_file_permissions = FILE_WRITE_MODE;
Expand Down
5 changes: 5 additions & 0 deletions platform/common/core/Core_Output.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ class Core_Output extends CI_Output {

public function __construct()
{
// Modified by Ivan Tcholakov, 27-FEB-2021.
//isset(self::$func_overload) OR self::$func_overload = (extension_loaded('mbstring') && ini_get('mbstring.func_overload'));
isset(self::$func_overload) OR self::$func_overload = (defined('MB_OVERLOAD_STRING') && ((int) @ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING));
//

parent::__construct();

// Added by Ivan Tcholakov, 24-JAN-2016.
Expand Down
18 changes: 18 additions & 0 deletions platform/common/libraries/Encryption.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

defined('BASEPATH') OR exit('No direct script access allowed.');

class Encryption extends CI_Encryption {


public function __construct(array $params = array())
{
// Modified by Ivan Tcholakov, 27-FEB-2021.
//isset(self::$func_overload) OR self::$func_overload = (extension_loaded('mbstring') && ini_get('mbstring.func_overload'));
isset(self::$func_overload) OR self::$func_overload = (defined('MB_OVERLOAD_STRING') && ((int) @ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING));
//

parent::__construct();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
*/
public function __construct(&$params)
{
parent::__construct($params);
// Modified and moved here by Ivan Tcholakov, 27-FEB-2021.
//isset(self::$func_overload) OR self::$func_overload = (extension_loaded('mbstring') && ini_get('mbstring.func_overload'));
isset(self::$func_overload) OR self::$func_overload = (defined('MB_OVERLOAD_STRING') && ((int) @ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING));
//

parent::__construct($params);

if (isset($this->_config['save_path']))
{
Expand All @@ -114,8 +119,6 @@ public function __construct(&$params)
}

$this->_sid_regexp = $this->_config['_sid_regexp'];

isset(self::$func_overload) OR self::$func_overload = (extension_loaded('mbstring') && ini_get('mbstring.func_overload'));
}

// ------------------------------------------------------------------------
Expand Down
17 changes: 17 additions & 0 deletions platform/common/libraries/Zip.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

defined('BASEPATH') OR exit('No direct script access allowed');

class Zip extends CI_Zip {

public function __construct()
{
// Modified by Ivan Tcholakov, 27-FEB-2021.
//isset(self::$func_overload) OR self::$func_overload = (extension_loaded('mbstring') && ini_get('mbstring.func_overload'));
isset(self::$func_overload) OR self::$func_overload = (defined('MB_OVERLOAD_STRING') && ((int) @ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING));
//

parent::__construct();
}

}

0 comments on commit dd3c9c8

Please sign in to comment.