From 1ade4993f93dd951be0180d2348f47c1973b8839 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Tue, 4 Aug 2020 14:24:43 +0300 Subject: [PATCH] Fix #18204: Fix 2.0.36 regression in inline validator and JS validation --- framework/CHANGELOG.md | 1 + framework/validators/InlineValidator.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index da4957d..579411a 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -8,6 +8,7 @@ Yii Framework 2 Change Log - Bug #18170: Fix 2.0.36 regression in passing extra console command arguments to the action (darkdef) - Bug #18182: `yii\db\Expression` was not supported as condition in `ActiveRecord::findOne()` and `ActiveRecord::findAll()` (rhertogh) - Bug #18189: Fix "Invalid parameter number" in `yii\rbac\DbManager::removeItem()` (samdark) +- Bug #18204: Fix 2.0.36 regression in inline validator and JS validation (samdark) - Enh #18205: Add `.phpstorm.meta.php` file for better auto-completion in PhpStorm (vjik) diff --git a/framework/validators/InlineValidator.php b/framework/validators/InlineValidator.php index e6db1c9..a8dcd00 100644 --- a/framework/validators/InlineValidator.php +++ b/framework/validators/InlineValidator.php @@ -94,7 +94,7 @@ class InlineValidator extends Validator if (is_string($method)) { $method = [$model, $method]; } elseif ($method instanceof \Closure) { - $method = $this->method->bindTo($model); + $method = $method->bindTo($model); } $current = $this->current; if ($current === null) {