Skip to content
Snippets Groups Projects
Commit 2660ee92 authored by Pierre Dureau's avatar Pierre Dureau
Browse files

Issue #3504119 by pdureau: TypeError: in_array() in NumberWidget

parent 75103c4f
Branches
Tags
1 merge request!335Issue #3504119 by pdureau: TypeError: in_array() in NumberWidget
Pipeline #414019 passed
......@@ -50,7 +50,11 @@ class NumberWidget extends SourcePluginPropValue {
// "object" type to all props to "allows deferring rendering in Twig to the
// render pipeline". Remove it as soon as this weird mechanism is removed
// from SDC.
if (in_array("integer", $this->propDefinition["type"]) && !in_array("number", $this->propDefinition["type"], TRUE)) {
$type = $this->propDefinition["type"];
if (is_array($type) && in_array("integer", $type) && !in_array("number", $type, TRUE)) {
$form['value']['#step'] = 1;
}
if (is_string($type) && $type === 'integer') {
$form['value']['#step'] = 1;
}
if (isset($this->propDefinition["minimum"])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment