String 非法字符串偏移量';处理程序';在PHP中

String 非法字符串偏移量';处理程序';在PHP中,string,offset,String,Offset,请说明如何更正此错误: Warning: Illegal string offset 'handler' in /home/***************/public_html/whois/phpwhois/whois.gtld.php on line 95 关于以下代码: function parse($data, $query) { $this->Query = array(); $this->SUBVERSION = sprintf("%s-%s", $query["han

请说明如何更正此错误:

Warning: Illegal string offset 'handler' in /home/***************/public_html/whois/phpwhois/whois.gtld.php on line 95
关于以下代码:

function parse($data, $query)
{
$this->Query = array();
$this->SUBVERSION = sprintf("%s-%s", $query["handler"], $this->HANDLER_VERSION);
$this->result = generic_parser_b($data["rawdata"], $this->REG_FIELDS, 'dmy');

请检查$query是否为字符串,如果为,则代码将不起作用。确保将$INQUIRY作为数组传递或引发异常。

OK。请考虑解决这个问题。我在这一页上找到了解决方案:不过,如果您有什么要补充的,我将不胜感激。非常感谢。这是一个旧职位。我确实在寻找解决方案,因此,分享我的发现解决方案,该解决方案已经由github中的phpwhois制定