Skip to content

Commit

Permalink
Replace deprecated each() function with for...in loop (#13308)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsfwk authored and sergeyklay committed Feb 28, 2018
1 parent c8c4f03 commit 39091bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-3.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- Fixed `Phalcon\Db\Dialect\Mysql::modifyColumn` to produce valid SQL for renaming the column [#13012](https://github.com/phalcon/cphalcon/issues/13012)
- Fixed `Phalcon\Forms\Form::getMessages` to return back previous behaviour: return array of messages with element name as key [#13294](https://github.com/phalcon/cphalcon/issues/13294)
- Fixed `Phalcon\Mvc\Model\Behavior\SoftDelete::notify` to solve the exception that soft deletion renamed model [#13302](https://github.com/phalcon/cphalcon/issues/13302), [#13306](https://github.com/phalcon/cphalcon/issues/13306)
- Fixed `E_DEPRECATED` error for `each()` in `Phalcon\Debug\Dump` [#13253](https://github.com/phalcon/cphalcon/issues/13253)

# [3.3.1](https://github.com/phalcon/cphalcon/releases/tag/v3.3.1) (2018-01-08)
- Fixed a boolean logic error in the CSS minifier and a corresponding unit test so that whitespace is stripped [#13200](https://github.com/phalcon/cphalcon/pull/13200)
Expand Down
15 changes: 2 additions & 13 deletions phalcon/debug/dump.zep
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,7 @@ class Dump
}
} else {
// Debug all properties
do {

let attr = each(variable);

if !attr {
continue;
}

let key = attr["key"],
value = attr["value"];

for key, value in variable {
if !key {
continue;
}
Expand All @@ -221,8 +211,7 @@ class Dump

let output .= str_repeat(space, tab) . strtr("-><span style=':style'>:key</span> (<span style=':style'>:type</span>) = ", [":style": this->getStyle("obj"), ":key": end(key), ":type": type]);
let output .= this->output(value, "", tab + 1) . "\n";

} while attr;
}
}

let attr = get_class_methods(variable);
Expand Down

0 comments on commit 39091bf

Please sign in to comment.