Menu

#130 error in whois.gtld.php with PHP 5.4

open
nobody
None
5
2013-02-22
2013-02-22
mike dee
No

at ~ line 57:

$this->SUBVERSION = sprintf('%s-%s', $query['handler'], $this->HANDLER_VERSION);

$query['handler'] does not exist, in earlier versions of PHP it appears that the value in $query (the domain) was shoved into/created $query['handler'] and everything seemed to work fine. I've never seen this from PHP before, and apparently there are additional strict settings in 5.4, dunno.

For PHP 5.4.6 I had to make the following change:

if (isset($query['handler'])) {
$handler = $query['handler'];
} else {
$handler = $query;
}
$this->SUBVERSION = sprintf('%s-%s', $handler, $this->HANDLER_VERSION)

I'm not sure if some other calling method passes a valid assoc array in so I still trapped for it, but every time I've seen the problem $query is passed in as a string vs an assoc array as the code expects

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.