Skip to content

Commit

Permalink
Fix issue in MB_ENABLED when using Inflector helper
Browse files Browse the repository at this point in the history
  • Loading branch information
rougin committed Apr 28, 2016
1 parent 286003d commit 2f880c9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

All Notable changes to `Spark Plug` will be documented in this file

## [0.4.0](https://github.com/rougin/spark-plug/compare/v0.2.0...v0.4.0) - 2016-04-25
## [0.4.1](https://github.com/rougin/spark-plug/compare/v0.4.0...v0.4.1) - 2016-04-29

### Fixed
- `MB_ENABLED` issue when using `Inflector` helper

## [0.4.0](https://github.com/rougin/spark-plug/compare/v0.3.0...v0.4.0) - 2016-04-25

### Added
- `Instance::create`
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"suggest": {
"rougin/codeigniter": "Yet another way to install CodeIgniter via Composer",
"rougin/combustor": "A tool for speeding up web development in CodeIgniter",
"rougin/refinery": "A command line interface for Migrations Class in CodeIgniter"
"rougin/combustor": "Lets you generate controllers, models, and views from database tables for CodeIgniter",
"rougin/refinery": "\"Ready-to-eat\" migrations for CodeIgniter"
}
}
4 changes: 4 additions & 0 deletions src/SparkPlug.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ protected function setCharSet()

ini_set('default_charset', $charset);

if ( ! defined('MB_ENABLED')) {
define('MB_ENABLED', extension_loaded('mbstring'));
}

// mbstring.internal_encoding is deprecated starting with PHP 5.6
// and it's usage triggers E_DEPRECATED messages.
if ( ! is_php('5.6') && ! ini_get('mbstring.internal_encoding')) {
Expand Down

0 comments on commit 2f880c9

Please sign in to comment.