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

[media] fix centerID #9469

Closed
wants to merge 3 commits into from
Closed

Conversation

kongtiaowang
Copy link
Contributor

@kongtiaowang kongtiaowang commented Nov 14, 2024

produce the issue: create a new user then login media module, it will got this error below.
[media] fix centerID::singleton(int ...)
PHP Fatal error: Uncaught TypeError: CenterID::singleton(): Argument #1 ($id) must be of type int, string given,

@kongtiaowang kongtiaowang added the Category: Bug PR or issue that aims to report or fix a bug label Nov 14, 2024
@driusan
Copy link
Collaborator

driusan commented Nov 15, 2024

What version of PHP are you running? CenterID is an integer database column. It should already be returned as an int by the PDO.

These changes look unnecessary and may break when the value is null (in which case a CenterID class for CenterID 0 will be returned.)

@kongtiaowang
Copy link
Contributor Author

I am using php 8.3.12. to produce the issue: create a new user then login media module, it will got this error.

@kongtiaowang
Copy link
Contributor Author

[media] fix non-admin user login error #9477
will replace this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Bug PR or issue that aims to report or fix a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants