Skip to content

Commit

Permalink
Merge pull request #10412 from SidRoberts/mvc-model-resultset-complex…
Browse files Browse the repository at this point in the history
…-underscore

Removed `underscore` variable from Mvc\Model\Resultset\Complex::current()
  • Loading branch information
andresgutierrez committed May 26, 2015
2 parents d49e96d + 3837655 commit 905a896
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions phalcon/mvc/model/resultset/complex.zep
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Complex extends Resultset implements ResultsetInterface
*/
public final function current() -> <ModelInterface> | boolean
{
var row, underscore, hydrateMode,
var row, hydrateMode,
dirtyState, alias, activeRow, type, columnTypes,
column, columnValue, value, attribute, source, attributes,
columnMap, rowModel, keepSnapshots, sqlAlias;
Expand Down Expand Up @@ -101,8 +101,6 @@ class Complex extends Resultset implements ResultsetInterface
*/
let hydrateMode = this->_hydrateMode;

let underscore = "_";

/**
* Each row in a complex result is a Phalcon\Mvc\Model\Row instance
*/
Expand Down Expand Up @@ -157,7 +155,7 @@ class Complex extends Resultset implements ResultsetInterface
/**
* Columns are supposed to be in the form _table_field
*/
let columnValue = row[underscore . source . underscore. attribute],
let columnValue = row["_" . source . "_". attribute],
rowModel[attribute] = columnValue;
}

Expand Down Expand Up @@ -212,7 +210,7 @@ class Complex extends Resultset implements ResultsetInterface
if isset column["balias"] {
let attribute = alias;
} else {
let attribute = str_replace(underscore, "", alias);
let attribute = str_replace("_", "", alias);
}
}

Expand Down

0 comments on commit 905a896

Please sign in to comment.