Account created on 21 November 2016, over 7 years ago
#

Merge Requests

Recent comments

๐Ÿ‡ฎ๐Ÿ‡ณIndia Manikandan Era

Manikandan Era โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia Manikandan Era

The error "Undefined array key 2" typically occurs when you're trying to access an array element using a key that doesn't exist. In your case, it seems like the $arg array doesn't have a key with index 2, and you're trying to access it.

Here's a safer way to check if the key exists before accessing it:

if (isset($arg[1]) && $arg[1] == "checkout" && isset($arg[2]) && !(is_numeric($arg[2]))) {
$path = $this->commerceUrlProcess($path, $arg, EncryptDecrypt::DECRYPT);
}

This code uses the isset() function to check if the keys $arg[1] and $arg[2] exist before comparing or using their values. This should help prevent the "Undefined array key" error.

Make sure to adapt this to your specific needs and context. If $arg is expected to have certain keys under different conditions, you may need to adjust the conditions accordingly.

Production build 0.69.0 2024