Skip to content

Commit 2e98f9d

Browse files
committed
refactor: use filter_var to process node value
1 parent 7e364fd commit 2e98f9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Webapi/Model/Config/Converter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ protected function convertMethodParameters($parameters)
138138
}
139139
$name = $parameter->attributes->getNamedItem('name')->nodeValue;
140140
$forceNode = $parameter->attributes->getNamedItem('force');
141-
$force = $forceNode ? (bool)$forceNode->nodeValue : false;
141+
$force = filter_var($forceNode->nodeValue, FILTER_VALIDATE_BOOLEAN);
142142
$value = $parameter->nodeValue;
143143
$data[$name] = [
144144
self::KEY_FORCE => $force,

0 commit comments

Comments
 (0)