mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#20710:Fixing empty string support in command recipe handler
Work Item: 20710
This commit is contained in:

committed by
Sebastien Ros

parent
600dda4a2a
commit
d33069b1ff
@@ -67,8 +67,9 @@ namespace Orchard.Recipes.RecipeHandlers {
|
||||
};
|
||||
|
||||
foreach (var arg in args) {
|
||||
// Switch?
|
||||
if (arg[0] == '/') {
|
||||
if (arg.StartsWith("/")) {
|
||||
//If arg is not empty and starts with '/'
|
||||
|
||||
int index = arg.IndexOf(':');
|
||||
var switchName = (index < 0 ? arg.Substring(1) : arg.Substring(1, index - 1));
|
||||
var switchValue = (index < 0 || index >= arg.Length ? string.Empty : arg.Substring(index + 1));
|
||||
|
Reference in New Issue
Block a user