Browse Source

added comment about non-looping foreach

fixes #16727
tags/2.0.16
Carsten Brandt 6 years ago
parent
commit
682c7b4a2a
No known key found for this signature in database
GPG Key ID: BE4F41DE1DEEEED0
  1. 1
      framework/db/ActiveQuery.php

1
framework/db/ActiveQuery.php

@ -583,6 +583,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface
$tableName = $this->getPrimaryTableName();
} else {
$tableName = '';
// if the first entry in "from" is an alias-tablename-pair return it directly
foreach ($this->from as $alias => $tableName) {
if (is_string($alias)) {
return [$tableName, $alias];

Loading…
Cancel
Save