Skip to content

Commit

Permalink
Fixed php 5 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-deluna committed Aug 19, 2016
1 parent e8853c2 commit d065a22
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Translator/Mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,10 @@ protected function translateOrderBy()
// array because we cannot make objects to array keys.
if (is_array($direction))
{
list($column, $direction) = $direction;
// This only works in php 7 the php 5 fix is below
//list($column, $direction) = $direction;
$column = $direction[0];
$direction = $direction[1];
}

$build .= $this->escape($column) . ' ' . $direction . ', ';
Expand Down

0 comments on commit d065a22

Please sign in to comment.