Skip to content

Commit

Permalink
PHP 5.3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
fisharebest committed Jan 1, 2016
1 parent a085bd6 commit c314ecc
Show file tree
Hide file tree
Showing 124 changed files with 2,845 additions and 1,165 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ php:
- 7.0
- 5.6
- 5.5
- 5.4
- 5.3
- hhvm

sudo: false

before_script:
- composer self-update
- composer update --no-interaction
- composer install --no-interaction

script:
- phpunit --coverage-clover tests/clover.xml
Expand Down
6 changes: 4 additions & 2 deletions app/I18N.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ public static function htmlAttributes() {
public static function init($code = null) {
global $WT_TREE;

mb_internal_encoding('UTF-8');

if ($code !== null) {
// Create the specified locale
self::$locale = Locale::create($code);
Expand Down Expand Up @@ -678,7 +680,7 @@ public static function strcasecmp($string1, $string2) {
*/
public static function strtolower($string) {
if (self::$locale->language()->code() === 'tr' || self::$locale->language()->code() === 'az') {
$string = strtr($string, ['I' => 'ı', 'İ' => 'i']);
$string = strtr($string, array('I' => 'ı', 'İ' => 'i'));
}

return mb_strtolower($string);
Expand All @@ -695,7 +697,7 @@ public static function strtolower($string) {
*/
public static function strtoupper($string) {
if (self::$locale->language()->code() === 'tr' || self::$locale->language()->code() === 'az') {
$string = strtr($string, ['ı' => 'I', 'i' => 'İ']);
$string = strtr($string, array('ı' => 'I', 'i' => 'İ'));
}

return mb_strtoupper($string);
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"fabpot/php-cs-fixer": "*",
"mockery/mockery": "*",
"phpunit/phpunit": "*",
"satooshi/php-coveralls": "dev-master"
"satooshi/php-coveralls": "~1.0"
},
"extra": {
"branch-alias": {
Expand Down
Loading

0 comments on commit c314ecc

Please sign in to comment.