Uncaught ArgumentCountError: Too few arguments to function Href::redirect()

Ask the community for help and support.
Post Reply
fcollingwood
Posts: 19
Joined: Mon Apr 05, 2021 7:34 am
Has thanked: 2 times
Been thanked: 2 times

Uncaught ArgumentCountError: Too few arguments to function Href::redirect()

Post by fcollingwood »

I'm getting the following in my error log on every access to any page:
[25-Apr-2021 00:07:21 Pacific/Auckland] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Href::redirect(), 0 passed in <my catalog>/includes/system/segments/application/parse_actions.php on line 17 and exactly 1 expected in <my catalog>/includes/system/versioned/1.0.8.1/href.php:129
Stack trace:
#0 <my catalog>/includes/system/segments/application/parse_actions.php(17): Href::redirect()
#1 <my catalog>/includes/application_top.php(46): require('<my catalog>...')
#2 <my catalog>/products_new.php(13): require('<my catalog>...')
#3 {main}
thrown in <my catalog>/includes/system/versioned/1.0.8.1/href.php on line 129
I haven't touched either of these files, so it's a bit odd
ecartz
Lead Developer
Lead Developer
Posts: 2637
Joined: Tue Nov 05, 2019 6:02 pm
Has thanked: 4 times
Been thanked: 181 times

Re: Uncaught ArgumentCountError: Too few arguments to function Href::redirect()

Post by ecartz »

That's the "session not started" case. So your first problem is whatever is keeping the session from starting.

The second problem is that linking does not seem to be working. Line 17 of parse_actions.php:

Code: Select all

      Href::redirect(Guarantor::ensure_global('Linker')->build('cookie_usage.php'));
Something would seem to be wrong with Linker or Href (Linker->build calls Href). You could add

Code: Select all

var_dump($Linker);
immediately before line 17 and see if that gives you any useful information.
User avatar
edfaught
Posts: 49
Joined: Mon Oct 26, 2020 3:22 pm
Has thanked: 4 times
Been thanked: 2 times

Re: Uncaught ArgumentCountError: Too few arguments to function Href::redirect()

Post by edfaught »

Has anyone found the solution to this?
Post Reply