File tree 2 files changed +9
-4
lines changed
app/code/Magento/Cron/Observer
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,9 @@ public function execute(\Magento\Framework\Event\Observer $observer)
148
148
$ jobGroupsRoot = $ this ->_config ->getJobs ();
149
149
150
150
foreach ($ jobGroupsRoot as $ groupId => $ jobsRoot ) {
151
- if ($ this ->_request ->getParam ('group ' ) !== null && $ this ->_request ->getParam ('group ' ) != $ groupId ) {
151
+ if ($ this ->_request ->getParam ('group ' ) !== null
152
+ && $ this ->_request ->getParam ('group ' ) !== '\'' . ($ groupId ) . '\''
153
+ && $ this ->_request ->getParam ('group ' ) !== $ groupId ) {
152
154
continue ;
153
155
}
154
156
if (($ this ->_request ->getParam (self ::STANDALONE_PROCESS_STARTED ) !== '1 ' ) && (
Original file line number Diff line number Diff line change 11
11
12
12
require dirname (__DIR__ ) . '/app/bootstrap.php ' ;
13
13
14
- if ($ _GET ){
15
- $ opt = $ _GET ;
16
- } else {
14
+ if (php_sapi_name () === 'cli ' ){
17
15
echo "You cannot run this from the command line. " . PHP_EOL .
18
16
"Run \"php bin/magento cron:run \" instead. " . PHP_EOL ;
19
17
exit (1 );
18
+ } else {
19
+ $ opt = $ _GET ;
20
20
}
21
21
22
22
try {
23
23
if (empty ($ opt ['group ' ])) {
24
24
$ opt ['group ' ] = 'default ' ;
25
25
}
26
+ foreach ($ opt as $ key => $ value ) {
27
+ $ opt [$ key ] = escapeshellarg ($ value );
28
+ }
26
29
$ opt ['standaloneProcessStarted ' ] = '0 ' ;
27
30
$ params = $ _SERVER ;
28
31
$ params [StoreManager::PARAM_RUN_CODE ] = 'admin ' ;
You can’t perform that action at this time.
0 commit comments