-
Notifications
You must be signed in to change notification settings - Fork 7
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
Bug when calling fetchCol() in new Backdrop core release, 1.30.0 #42
Comments
Interesting. This syntax is also used in the devel_generate submodule (in devel_generate.inc):
|
Hmm... the method I have no idea how |
Correct, @argiepiano. This error has raised now that we've moved our server from php 7.4 to 8.3. |
Issue #42: Fix bug in profile generation.
Fix tested and merged in. Thanks @oriolroger and @argiepiano! |
Hi all.
We've found a possible bug in the Profile module, when upgrading the Backdrop core to the latest release, 1.30.0
The function to fetch a column in the database (fetchCol) doesn't allow to send a string parameter with the name of the field anymore. It has to send an empty or an integer parameter, with the index of the field we want to fetch.
So in the function profile_generate_form_submit($form, &$form_state), we should replace this call:
$users = $query->execute()->fetchCol('uid');
with the correct one:
$users = $query->execute()->fetchCol();
Otherwise, when we try to generate profiles with the Devel module (can do it in the URL /admin/devel/generate/profile), we'll get an error:
PDOStatement::fetchAll(): Argument #2 must be of type int, string given
Thanks!
The text was updated successfully, but these errors were encountered: