diff --git a/src/Agent.php b/src/Agent.php index 7fd4d03..a1549f0 100644 --- a/src/Agent.php +++ b/src/Agent.php @@ -320,6 +320,10 @@ public function version($propertyName, $type = self::VERSION_TYPE_STRING) $properties[$propertyName] = (array) $properties[$propertyName]; foreach ($properties[$propertyName] as $propertyMatchString) { + if (is_array($propertyMatchString)) { + $propertyMatchString = implode("|", $propertyMatchString); + } + $propertyPattern = str_replace('[VER]', self::VER, $propertyMatchString); // Identify and extract the version. @@ -347,10 +351,6 @@ protected static function mergeRules(...$all) foreach ($all as $rules) { foreach ($rules as $key => $value) { - if (is_array($value)) { - $value = implode('|', $value); - } - if (empty($merged[$key])) { $merged[$key] = $value; } elseif (is_array($merged[$key])) {