Post by furrywombat » Sat May 02, 2015 11:10 pm

I am trying to extend a module we're working on to login to a customer account by customer_id, without providing an admin token. The error I'm getting is:

Code: Select all

PHP Fatal Error:  array_key_exists() expects parameter 2 to be array, null given in /path/to/vqmod/vqcache/vq2-system_library_customer.php on line [obscured]
The affected line:

Code: Select all

if (!array_key_exists($key, $this->session->data['cart'])) {
If I comment that out and go straight for:

Code: Select all

$this->session->data['cart'][$key] += $value;
I get a different error:

Code: Select all

Undefined offset: [obscured] in /path/to/vqmod/vqcache/vq2-system_library_customer.php on line [obscured]
Just a note, references to [obscured] and [/path/to/] were substitutions. Actual values are indeed valid.

Does the admin token actually need to be set to use this function with the override variable in such as way as to pass without error? Is this why I am receiving this error? Is there any way around the admin token requirement, such as a temporary token passed internally and only usable once for the purpose of logging into a customer account? I'm receiving a TRUE response to the login function call, yet for whatever reason, this error is popping up and preventing further action. In fact, the login function WORKS, however, this error keeps popping up in the log file as a result of the function call. Any ideas...?

EDIT:

The login function does NOT work ???

How to get around this?

User avatar
New member

Posts

Joined
Sat Oct 19, 2013 9:15 pm
Location - Chair
Who is online

Users browsing this forum: No registered users and 17 guests