Skip to content

Commit

Permalink
Fix a func_get_arg() value error (see #3245)
Browse files Browse the repository at this point in the history
Description
-----------

| Q                | A
| -----------------| ---
| Fixed issues     | Fixes #3238

Backport of #3243 for Contao 4.9

Commits
-------

afb783e Fix func_get_arg ValueError
  • Loading branch information
ausi committed Aug 2, 2021
1 parent b012205 commit 66ed49f
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 16 deletions.
Expand Up @@ -1068,7 +1068,7 @@ public function toggleIcon($row, $href, $label, $title, $icon, $attributes)
{
if (Contao\Input::get('tid'))
{
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (@func_get_arg(12) ?: null));
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (func_num_args() <= 12 ? null : func_get_arg(12)));
$this->redirect($this->getReferer());
}

Expand Down
2 changes: 1 addition & 1 deletion comments-bundle/src/Resources/contao/dca/tl_comments.php
Expand Up @@ -611,7 +611,7 @@ public function toggleIcon($row, $href, $label, $title, $icon, $attributes)
{
if (Contao\Input::get('tid'))
{
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (@func_get_arg(12) ?: null));
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (func_num_args() <= 12 ? null : func_get_arg(12)));
$this->redirect($this->getReferer());
}

Expand Down
2 changes: 1 addition & 1 deletion core-bundle/src/Resources/contao/dca/tl_article.php
Expand Up @@ -868,7 +868,7 @@ public function toggleIcon($row, $href, $label, $title, $icon, $attributes)
{
if (Contao\Input::get('tid'))
{
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (@func_get_arg(12) ?: null));
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (func_num_args() <= 12 ? null : func_get_arg(12)));
$this->redirect($this->getReferer());
}

Expand Down
2 changes: 1 addition & 1 deletion core-bundle/src/Resources/contao/dca/tl_content.php
Expand Up @@ -1950,7 +1950,7 @@ public function toggleIcon($row, $href, $label, $title, $icon, $attributes)
{
if (Contao\Input::get('cid'))
{
$this->toggleVisibility(Contao\Input::get('cid'), (Contao\Input::get('state') == 1), (@func_get_arg(12) ?: null));
$this->toggleVisibility(Contao\Input::get('cid'), (Contao\Input::get('state') == 1), (func_num_args() <= 12 ? null : func_get_arg(12)));
$this->redirect($this->getReferer());
}

Expand Down
2 changes: 1 addition & 1 deletion core-bundle/src/Resources/contao/dca/tl_form_field.php
Expand Up @@ -775,7 +775,7 @@ public function toggleIcon($row, $href, $label, $title, $icon, $attributes)
{
if (Contao\Input::get('tid'))
{
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (@func_get_arg(12) ?: null));
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (func_num_args() <= 12 ? null : func_get_arg(12)));
$this->redirect($this->getReferer());
}

Expand Down
Expand Up @@ -264,7 +264,7 @@ public function toggleIcon($row, $href, $label, $title, $icon, $attributes)
{
if (Contao\Input::get('tid'))
{
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (@func_get_arg(12) ?: null));
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (func_num_args() <= 12 ? null : func_get_arg(12)));
$this->redirect($this->getReferer());
}

Expand Down
2 changes: 1 addition & 1 deletion core-bundle/src/Resources/contao/dca/tl_member.php
Expand Up @@ -581,7 +581,7 @@ public function toggleIcon($row, $href, $label, $title, $icon, $attributes)
{
if (Contao\Input::get('tid'))
{
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (@func_get_arg(12) ?: null));
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (func_num_args() <= 12 ? null : func_get_arg(12)));
$this->redirect($this->getReferer());
}

Expand Down
2 changes: 1 addition & 1 deletion core-bundle/src/Resources/contao/dca/tl_member_group.php
Expand Up @@ -207,7 +207,7 @@ public function toggleIcon($row, $href, $label, $title, $icon, $attributes)
{
if (Contao\Input::get('tid'))
{
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (@func_get_arg(12) ?: null));
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (func_num_args() <= 12 ? null : func_get_arg(12)));
$this->redirect($this->getReferer());
}

Expand Down
2 changes: 1 addition & 1 deletion core-bundle/src/Resources/contao/dca/tl_page.php
Expand Up @@ -1767,7 +1767,7 @@ public function toggleIcon($row, $href, $label, $title, $icon, $attributes)
{
if (Contao\Input::get('tid'))
{
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (@func_get_arg(12) ?: null));
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (func_num_args() <= 12 ? null : func_get_arg(12)));
$this->redirect($this->getReferer());
}

Expand Down
2 changes: 1 addition & 1 deletion core-bundle/src/Resources/contao/dca/tl_style.php
Expand Up @@ -680,7 +680,7 @@ public function toggleIcon($row, $href, $label, $title, $icon, $attributes)
{
if (Contao\Input::get('tid'))
{
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (@func_get_arg(12) ?: null));
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (func_num_args() <= 12 ? null : func_get_arg(12)));
$this->redirect($this->getReferer());
}

Expand Down
2 changes: 1 addition & 1 deletion core-bundle/src/Resources/contao/dca/tl_user.php
Expand Up @@ -944,7 +944,7 @@ public function toggleIcon($row, $href, $label, $title, $icon, $attributes)
{
if (Contao\Input::get('tid'))
{
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (@func_get_arg(12) ?: null));
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (func_num_args() <= 12 ? null : func_get_arg(12)));
$this->redirect($this->getReferer());
}

Expand Down
2 changes: 1 addition & 1 deletion core-bundle/src/Resources/contao/dca/tl_user_group.php
Expand Up @@ -451,7 +451,7 @@ public function toggleIcon($row, $href, $label, $title, $icon, $attributes)
{
if (Contao\Input::get('tid'))
{
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (@func_get_arg(12) ?: null));
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (func_num_args() <= 12 ? null : func_get_arg(12)));
$this->redirect($this->getReferer());
}

Expand Down
2 changes: 1 addition & 1 deletion faq-bundle/src/Resources/contao/dca/tl_faq.php
Expand Up @@ -547,7 +547,7 @@ public function toggleIcon($row, $href, $label, $title, $icon, $attributes)
{
if (Contao\Input::get('tid'))
{
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (@func_get_arg(12) ?: null));
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (func_num_args() <= 12 ? null : func_get_arg(12)));
$this->redirect($this->getReferer());
}

Expand Down
4 changes: 2 additions & 2 deletions news-bundle/src/Resources/contao/dca/tl_news.php
Expand Up @@ -938,7 +938,7 @@ public function iconFeatured($row, $href, $label, $title, $icon, $attributes)
{
if (Contao\Input::get('fid'))
{
$this->toggleFeatured(Contao\Input::get('fid'), (Contao\Input::get('state') == 1), (@func_get_arg(12) ?: null));
$this->toggleFeatured(Contao\Input::get('fid'), (Contao\Input::get('state') == 1), (func_num_args() <= 12 ? null : func_get_arg(12)));
$this->redirect($this->getReferer());
}

Expand Down Expand Up @@ -1082,7 +1082,7 @@ public function toggleIcon($row, $href, $label, $title, $icon, $attributes)
{
if (Contao\Input::get('tid'))
{
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (@func_get_arg(12) ?: null));
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (func_num_args() <= 12 ? null : func_get_arg(12)));
$this->redirect($this->getReferer());
}

Expand Down
Expand Up @@ -373,7 +373,7 @@ public function toggleIcon($row, $href, $label, $title, $icon, $attributes)
{
if (Contao\Input::get('tid'))
{
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (@func_get_arg(12) ?: null));
$this->toggleVisibility(Contao\Input::get('tid'), (Contao\Input::get('state') == 1), (func_num_args() <= 12 ? null : func_get_arg(12)));
$this->redirect($this->getReferer());
}

Expand Down

0 comments on commit 66ed49f

Please sign in to comment.