mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-23 02:29:34 +00:00
Bring $value_text2 to a defined state
This commit is contained in:
parent
1a66ef1cfe
commit
f8db489c0d
1 changed files with 2 additions and 0 deletions
|
|
@ -75,6 +75,8 @@ class ParameterDTO
|
||||||
if (!empty($unit) && preg_match('/^(.+' . preg_quote($unit) . ')\s*(.+)$/', $parts[1], $matches) > 0) {
|
if (!empty($unit) && preg_match('/^(.+' . preg_quote($unit) . ')\s*(.+)$/', $parts[1], $matches) > 0) {
|
||||||
$parts[1] = $matches[1];
|
$parts[1] = $matches[1];
|
||||||
$value_text2 = $matches[2];
|
$value_text2 = $matches[2];
|
||||||
|
} else {
|
||||||
|
$value_text2 = null;
|
||||||
}
|
}
|
||||||
[$number2, $unit2] = self::splitIntoValueAndUnit(ltrim($parts[1], " +")) ?? [$parts[1], null];
|
[$number2, $unit2] = self::splitIntoValueAndUnit(ltrim($parts[1], " +")) ?? [$parts[1], null];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue