Hi,

I got this error when I deleted a new user (test user). I used Drupal 5.7 with pageroute, node family, node profile and nf_registration_mod to create a test user.

* warning: implode() [function.implode]: Invalid arguments passed in /home/newmill/public_html/sites/all/modules/user_cancellation/user_cancellation.module on line 210.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND uid = 3' at line 1 query: UPDATE node SET uid = 0 WHERE () AND uid = 3 in /home/newmill/public_html/includes/database.mysql.inc on line 172.

Any idea how I can fix this

Comments

shooommmm’s picture

Hi,

I posted the above issue. Is there anyone who can help ?

Thanks,

Hanly

toemaz’s picture

Title: warning: implode() [function.implode]: Invalid arguments passed in » user_cancellation variable should be array() by default, instead of null
Category: support » bug

The code should be improved. I had a quick look and I would change it as followed:

function divorce_children($uid, $type = null) {

  if (is_array($type)) {

should become

function divorce_children($uid, $type = array()) {

  if (count($type)) {

and

  variable_get('user_cancellation', null);

should change to

  variable_get('user_cancellation', array());

This way, you wouldn't have gotten the error message. You have it now, simply because you didn't select any 'node type' in the settings page.

millions’s picture

I'm getting the same thing, but for line 69, I'm trying to use advprofile with bio and when I input information for the User Profile it returns the Implode code line three times (all saying line 69). Any help would be great!

millions’s picture

I'm sorry, this was the only thing that showed up for the return implode. Mine is referencing a different file cck/content_panels.inc, not user cancellation.

sistro’s picture

Hi,

I've the same problem...

* warning: implode() [function.implode]: Invalid arguments passed in /home/newmill/public_html/sites/all/modules/user_cancellation/user_cancellation.module on line 210.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND uid = 3' at line 1 query: UPDATE node SET uid = 0 WHERE () AND uid = 3 in /home/newmill/public_html/includes/database.mysql.inc on line 172.

I've tried to modify the code as you suggest but nothings happens.
Only the profile is deleted, the content created by that user are still available on the site as anonymous contents.

Maybe sone inferference with other module... like Node Family / Node Profile?
Please someone help us!

Thanks so much...