aboutsummaryrefslogtreecommitdiffstats
path: root/core/namespace/Item.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/namespace/Item.php')
-rw-r--r--core/namespace/Item.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/namespace/Item.php b/core/namespace/Item.php
index 426dd2a..f1a0988 100644
--- a/core/namespace/Item.php
+++ b/core/namespace/Item.php
@@ -106,11 +106,14 @@ abstract class Item implements ItemInterface {
#===============================================================================
public function getArguments(): array {
if($argv = $this->Attribute->get('argv')) {
- foreach(explode('|', rtrim($argv, '|')) as $delimeter) {
+ foreach(explode('|', $argv) as $delimeter) {
$part = explode('=', $delimeter);
- if(!empty($part[0])) {
- $arguments[strtoupper($part[0])] = $part[1] ?? TRUE;
+ $argumentK = $part[0] ?? NULL;
+ $argumentV = $part[1] ?? TRUE;
+
+ if(preg_match('#^[[:word:]]+$#', $argumentK)) {
+ $arguments[strtoupper($argumentK)] = $argumentV;
}
}
}