I've just upgraded to release 6.x-1.2, and now I'm getting PHP errors using this module:

implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in /var/www/web64/html/boehne/sites/all/modules/contributed/whois/whois.module in line 175.

and

Missing argument 2 for _whois_utf8_encode(), called in /var/www/web64/html/boehne/sites/all/modules/contributed/whois/whois.module on line 175 and defined in /var/www/web64/html/boehne/sites/all/modules/contributed/whois/whois.module in line 272.

Seems to be buggy!

Regards,
Boris

Comments

helmo’s picture

Assigned: Unassigned » helmo
Status: Active » Needs review

Sorry to see that today's last patch screwed things up... I just committed a fix for this and one other error I discovered this afternoon.

DRUPAL-6--1-3-BETA1 contains these fixes and is available for download.

tumblingmug’s picture

However, the "recommended" version is broken and claims to be installed by update managers out there. I suggest to make an offtake for the current release.

My feeling says that untested versions should be marked as dev...

helmo’s picture

Status: Needs review » Fixed

I just released version 1.3

I had hoped for some feedback confirming that 1.3 beta 1 fixed the problem...

davemcza’s picture

Thanks for version 1.3, but :
Error (On 1.3) : warning: implode() [function.implode]: Invalid arguments passed in .../sites/all/modules/whois/whois.module on line 148.

I presume that the second argument is not an array, so, I changed:
(148) - $data .= check_plain(_whois_utf8_encode(implode("\n<br />", $whois->Query['errstr']), $address));
to

(148) $imploded = '';
(149) $errorstr = $whois->Query['errstr'];
(150) if(is_array($errorstr)){
(151)  $imploded = implode("\n<br />", $errorstr);
(152) }
(153) $data .= check_plain(_whois_utf8_encode($imploded, $address));

And it worked fine.

helmo’s picture

I see that the handling of errors has more problems... I'll work on that.

helmo’s picture

davemcza, I posted a new issue for this (#678886: Broken error handling).
Could you review the patch I've attached there?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.