Skip to content

Commit c4543c1

Browse files
committed
Using non-static Environment methods will raise deprecation notice in Contao 4
1 parent d81b1d9 commit c4543c1

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

system/modules/multicolumnwizard/MultiColumnWizard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ public function generate()
361361
$this->Config->update(sprintf("\$GLOBALS['TL_CONFIG']['%s']", $this->strField), serialize($this->varValue));
362362

363363
// Reload the page
364-
$this->redirect(preg_replace('/&(amp;)?cid=[^&]*/i', '', preg_replace('/&(amp;)?' . preg_quote($this->strCommand, '/') . '=[^&]*/i', '', $this->Environment->request)));
364+
$this->redirect(preg_replace('/&(amp;)?cid=[^&]*/i', '', preg_replace('/&(amp;)?' . preg_quote($this->strCommand, '/') . '=[^&]*/i', '', Environment::get('request'))));
365365
}
366366
// Save in table
367367
else if ($GLOBALS['TL_DCA'][$this->strTable]['config']['dataContainer'] == 'Table')
@@ -392,7 +392,7 @@ public function generate()
392392
}
393393

394394
// Reload the page
395-
$this->redirect(preg_replace('/&(amp;)?cid=[^&]*/i', '', preg_replace('/&(amp;)?' . preg_quote($this->strCommand, '/') . '=[^&]*/i', '', $this->Environment->request)));
395+
$this->redirect(preg_replace('/&(amp;)?cid=[^&]*/i', '', preg_replace('/&(amp;)?' . preg_quote($this->strCommand, '/') . '=[^&]*/i', '', Environment::get('request'))));
396396
}
397397
// Unknow
398398
else

system/modules/multicolumnwizard/MultiColumnWizardHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function addVersionToClass(&$objTemplate)
3434

3535
public function supportModalSelector($strTable)
3636
{
37-
if (strpos($this->Environment->script, 'contao/file.php') !== false)
37+
if (strpos(Environment::get('script'), 'contao/file.php') !== false)
3838
{
3939
list($strField, $strColumn) = explode('__', $this->Input->get('field'));
4040

0 commit comments

Comments
 (0)