Skip to content

Commit dcb086e

Browse files
committed
Fixed Php5.3 support #34
1 parent d45fb9d commit dcb086e

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ language: php
22
php:
33
- 5.5
44
- 5.4
5-
script: phpunit tests
5+
- 5.3
6+
script: phpunit tests

src/Translator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ public function addTranslations(array $translations)
7676

7777
// extract just the expression turn 'n' into a php variable '$n'.
7878
// Slap on a return keyword and semicolon at the end.
79-
$this->plurals[$domain] = [
79+
$this->plurals[$domain] = array(
8080
'count' => (int) str_replace('nplurals=', '', $count),
8181
'code' => str_replace('plural=', 'return ', str_replace('n', '$n', $code)).';',
82-
];
82+
);
8383

8484
$this->dictionary[$domain] = $translations;
8585
} else {

0 commit comments

Comments
 (0)