Browse Source

Revert "Replaced `extract()` function usages with custom polyfill in order to fix HHVM compatibility"

This reverts commit f7bd7c2b6b.
tags/2.0.10
SilverFire - Dmitry Naumenko 8 years ago
parent
commit
eb02b362be
  1. 1
      framework/CHANGELOG.md
  2. 4
      framework/base/View.php
  3. 8
      framework/requirements/YiiRequirementChecker.php
  4. 4
      framework/web/ErrorHandler.php
  5. 5
      framework/web/Session.php

1
framework/CHANGELOG.md

@ -34,7 +34,6 @@ Yii Framework 2 Change Log
- Bug #11715: Fixed JS validation when the same model's attribute file input is listed more than once on the same page (uaoleg)
- Bug #11541: Fixed default MySQL integer display width for unsigned primary key (h311ion, rob006, cebe)
- Bug #12143: Fixed `yii\db\BaseActiveRecord::updateAttributes()` change `isNewRecord` state for the new model (klimov-paul)
- Bug #12371: Replaced `extract()` function usages with custom polyfill in order to fix HHVM compatibility (silverfire, klimov-paul)
- Bug #12463: Fixed `yii\web\Request::getBodyParams()` does not pass full 'content-type' value to `yii\web\RequestParserInterface::parse()` (klimov-paul)
- Enh #9708: Added `yii\console\controllers\AssetController::deleteSource` option allowing deletion of the source asset files after compression (pana1990, klimov-paul)
- Enh #10243: Added `yii\data\Sort::setAttributeOrders()` method allowing manual setup of current sort (klimov-paul)

4
framework/base/View.php

@ -322,9 +322,7 @@ class View extends Component
{
ob_start();
ob_implicit_flush(false);
foreach ($_params_ as $key => $value) {
${$key} = $value;
}
extract($_params_, EXTR_OVERWRITE);
require($_file_);
return ob_get_clean();

8
framework/requirements/YiiRequirementChecker.php

@ -304,13 +304,7 @@ class YiiRequirementChecker
{
// we use special variable names here to avoid conflict when extracting data
if (is_array($_data_)) {
foreach ($_data_ as $key => $value) {
if (isset(${$key})) {
${'data_'.$key} = $value;
} else {
${$key} = $value;
}
}
extract($_data_, EXTR_PREFIX_SAME, 'data');
} else {
$data = $_data_;
}

4
framework/web/ErrorHandler.php

@ -233,9 +233,7 @@ class ErrorHandler extends \yii\base\ErrorHandler
if ($this->exception instanceof ErrorException || !Yii::$app->has('view')) {
ob_start();
ob_implicit_flush(false);
foreach ($_params_ as $key => $value) {
${$key} = $value;
}
extract($_params_, EXTR_OVERWRITE);
require(Yii::getAlias($_file_));
return ob_get_clean();

5
framework/web/Session.php

@ -363,9 +363,8 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
*/
private function setCookieParamsInternal()
{
foreach ($this->getCookieParams() as $key => $value) {
${$key} = $value;
}
$data = $this->getCookieParams();
extract($data);
if (isset($lifetime, $path, $domain, $secure, $httponly)) {
session_set_cookie_params($lifetime, $path, $domain, $secure, $httponly);
} else {

Loading…
Cancel
Save