Merge branch 'develop' of github.com:getgrav/grav into develop

# Conflicts:
#	CHANGELOG.md
This commit is contained in:
Andy Miller
2019-04-17 09:00:35 -06:00
3 changed files with 7 additions and 2 deletions

View File

@@ -6,6 +6,7 @@
* Added new `FormInterface::getTask()` method which reads the task from `form.task` in the blueprint
1. [](#bugfix)
* Rollback `redirect_default_route` logic as it has issues with multilang [#2459](https://github.com/getgrav/grav/issues/2459)
* Fixed bug in text field filtering: return empty string if value isn't a string or number
# v1.6.5
## 04/15/2019

View File

@@ -154,6 +154,10 @@ class Validation
protected static function filterText($value, array $params, array $field)
{
if (!\is_string($value) && !is_numeric($value)) {
return '';
}
if (!empty($params['trim'])) {
$value = trim($value);
}

View File

@@ -103,7 +103,7 @@ trait NestedPropertyTrait
$current[$offset] = [];
}
} else {
throw new \RuntimeException('Cannot set nested property on non-array value');
throw new \RuntimeException("Cannot set nested property {$property} on non-array value");
}
$current = &$current[$offset];
@@ -147,7 +147,7 @@ trait NestedPropertyTrait
return $this;
}
} else {
throw new \RuntimeException('Cannot set nested property on non-array value');
throw new \RuntimeException("Cannot unset nested property {$property} on non-array value");
}
$current = &$current[$offset];