1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 13:47:33 +02:00

Consider value of %n array as identifier

This commit is contained in:
Miloslav Hůla
2012-01-28 12:21:47 +01:00
committed by David Grudl
parent 0b2cb3c6e4
commit 2ae6535899

View File

@@ -239,7 +239,7 @@ final class DibiTranslator extends DibiObject
case 'n': // key, key, ... identifier names
foreach ($value as $k => $v) {
if (is_string($k)) {
$vx[] = $this->identifiers->$k . (empty($v) ? '' : ' AS ' . $v);
$vx[] = $this->identifiers->$k . (empty($v) ? '' : ' AS ' . $this->identifiers->$v);
} else {
$pair = explode('%', $v, 2); // split into identifier & modifier
$vx[] = $this->identifiers->{$pair[0]};