File tree 1 file changed +6
-6
lines changed
app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 8
8
9
9
use Magento \Backend \App \Action ;
10
10
use Magento \Store \Model \App \Emulation ;
11
+ use Magento \Framework \App \ObjectManager ;
11
12
12
13
class Generate extends \Magento \Sitemap \Controller \Adminhtml \Sitemap
13
14
{
@@ -17,16 +18,15 @@ class Generate extends \Magento\Sitemap\Controller\Adminhtml\Sitemap
17
18
/**
18
19
* Generate constructor.
19
20
* @param Action\Context $context
20
- * @param \Magento\Store\Model\App\Emulation $appEmulation
21
+ * @param \Magento\Store\Model\App\Emulation|null $appEmulation
21
22
*/
22
23
public function __construct (
23
24
Action \Context $ context ,
24
- Emulation $ appEmulation
25
+ Emulation $ appEmulation = null
25
26
) {
26
- $ this ->appEmulation = $ appEmulation ;
27
- parent ::__construct (
28
- $ context
29
- );
27
+ parent ::__construct ($ context );
28
+ $ this ->appEmulation = $ appEmulation ?: ObjectManager::getInstance ()
29
+ ->get (\Magento \Store \Model \App \Emulation::class);
30
30
}
31
31
32
32
/**
You can’t perform that action at this time.
0 commit comments