Add extra slashes to namespaced class passed as variable to shell commands

This commit is contained in:
Marco Hermo 2017-04-29 01:29:59 +12:00
parent 8bc6f5982c
commit b4d1e45f3c
1 changed files with 1 additions and 0 deletions

View File

@ -59,6 +59,7 @@ class SolrReindexImmediateHandler extends SolrReindexBase
// Build script
$indexName = $indexInstance->getIndexName();
$indexClass = get_class($indexInstance);
$class = addslashes($class);
$scriptPath = sprintf("%s%sframework%scli-script.php", BASE_PATH, DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR);
$scriptTask = "php {$scriptPath} dev/tasks/{$taskName}";
$cmd = "{$scriptTask} index={$indexClass} class={$class} group={$group} groups={$groups} variantstate={$statevar}";