Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.1.4]: 2: Undefined array key "code" #8279

Open
andrew-davie opened this issue Jul 2, 2024 · 6 comments
Open

[2.1.4]: 2: Undefined array key "code" #8279

andrew-davie opened this issue Jul 2, 2024 · 6 comments

Comments

@andrew-davie
Copy link

Basic Information

My error log is showing several of this error per-day, apparently when someone tries to register (user is Guest).
Essentially it just says "2: Undefined array key "code"

Steps to reproduce

I do not know how to reproduce. I have some successful registrations, and some of these log events suggesting registration basically works, but some condition causes it to fail sometimes, and trigger a code error. I have tried registering myself and it seemed to go OK. The message seems pretty straightforward, and the point in the code where it literally tries to access the array with the key 'code' is obvious. I just don't know the code well enough to understand why or what's going on.

Expected result

We should not be seeing an error in the log - this appears to be a code bug.
In other words, failed registrations are a different issue to this.

Actual result

As noted, it's intermittent and appears to be related to new registrations.
All that I know is the error log showing the message.

Screenshot 2024-07-02 at 5 51 00 PM Screenshot 2024-07-02 at 5 50 33 PM

Version/Git revision

2.1.4

Database Engine

MySQL

Database Version

5.7.44-percona-sure1-log

PHP Version

8.1

Logs

No response

Additional Information

No response

@arekpietrzyk
Copy link

Same issue here.

@DiegoAndresCortes
Copy link
Member

Title of this issue needs to be updated to indicate it's for 2.1

@sbulen
Copy link
Contributor

sbulen commented Aug 13, 2024

I can't reproduce, but note that this isn't a registration error - it's a search error. It's just using the function in Registration.php that validates the code.

But the "vid=search" indicates this is a search request.

So it appears the option to use verification on guest searches is enabled.

@sbulen
Copy link
Contributor

sbulen commented Aug 14, 2024

I saw a user report on another forum that they got this code error after using the forgot password email link.

@andrew-davie andrew-davie changed the title [3.0]: 2: Undefined array key "code" [2.1.4]: 2: Undefined array key "code" Aug 14, 2024
@andrew-davie
Copy link
Author

Another observation - my last 8 error messages were from a consistent (almost) IP address. [52.230.152.*] where the last number varies. Strangely, this appears to be Microsoft. Just coincidence I suppose, but I thought I'd mention it.

@arekpietrzyk
Copy link

I have no past logs now, but for me, it started right after upgrading to 2.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants