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

Open to all! Ask other shopowners for help.
Post Reply
fcollingwood

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


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 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
Member
Posts: 49
Joined: Mon Oct 26, 2020 3:22 pm
Phoenix Version:
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?


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply