Skip to content

Commit ff46c72

Browse files
committed
update list method instances to work for php5
1 parent 8a6ba5c commit ff46c72

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Commands/ShowCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ private function parseKey()
148148
try {
149149
list($this->file, $this->key) = explode('.', $this->argument('key'));
150150
} catch (\ErrorException $e) {
151+
$this->file = $this->argument('key');
151152
// If explosion resulted 1 array item then it's the file, we
152153
// leave the key as null.
153154
}

src/Commands/TransCommand.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,12 @@ public function handle()
9595
private function parseKey()
9696
{
9797
try {
98-
list($this->fileName, $this->key, $this->languageKey) = explode('.', $this->argument('key'));
98+
$parts = explode('.', $this->argument('key'));
99+
100+
$this->fileName = $parts[0];
101+
$this->key = $parts[1];
102+
$this->languageKey = $parts[2];
103+
99104
} catch (\ErrorException $e) {
100105
if (! $this->key) {
101106
$this->error('Could not recognize the key you want to translate.');

0 commit comments

Comments
 (0)