【发布时间】:2018-05-01 16:05:56
【问题描述】:
突然间,我过去几年使用的代码现在开始抛出错误。我正在使用 codeigniter php 框架。
无法弄清楚发生了什么。
A PHP Error was encountered
Severity: Notice
Message: Undefined property: AuthorizeNetTD_Response::$xpath_xml
Filename: shared/AuthorizeNetXMLResponse.php
Line Number: 54
Backtrace:
File: /home/directpr/public_html/reports/new/application/lib/shared/AuthorizeNetXMLResponse.php
Line: 54
Function: _error_handler
File: /home/directpr/public_html/reports/new/application/controllers/Collectionupdate.php
Line: 258
Function: xpath
File: /home/directpr/public_html/reports/new/index.php
Line: 292
Function: require_once
Fatal error: Uncaught TypeError: Argument 1 passed to CI_Exceptions::show_exception() must be an instance of Exception, instance of Error given, called in /home/directpr/public_html/reports/new/system/core/Common.php on line 658 and defined in /home/directpr/public_html/reports/new/system/core/Exceptions.php:190 Stack trace: #0 /home/directpr/public_html/reports/new/system/core/Common.php(658): CI_Exceptions->show_exception(Object(Error)) #1 [internal function]: _exception_handler(Object(Error)) #2 {main} thrown in /home/directpr/public_html/reports/new/system/core/Exceptions.php on line 190
A PHP Error was encountered
Severity: Error
Message: Uncaught TypeError: Argument 1 passed to CI_Exceptions::show_exception() must be an instance of Exception, instance of Error given, called in /home/directpr/public_html/reports/new/system/core/Common.php on line 658 and defined in /home/directpr/public_html/reports/new/system/core/Exceptions.php:190 Stack trace: #0 /home/directpr/public_html/reports/new/system/core/Common.php(658): CI_Exceptions->show_exception(Object(Error)) #1 [internal function]: _exception_handler(Object(Error)) #2 {main} thrown
Filename: core/Exceptions.php
Line Number: 190
Backtrace:
【问题讨论】:
-
如果不看到抛出这些错误的代码,就无法帮助您
-
让我把它贴在这里
-
/** * 对已清理的 XML 响应运行 xpath 查询 * * @ param string $path * @return array 返回 SimpleXMLElement 对象的数组,如果出错则返回 FALSE。 */ public function xpath($path) { return $this->xpath_xml->xpath($path); } 这是创建错误的地方
-
您可以将其添加到您的问题中而不是发表评论吗?
-
我们在这里遇到了一个非常相似的问题,不是使用 codeigniter,而是使用 PHP 客户端。我强烈怀疑 Authorize.net 更改了 API 中的某些内容,需要更新 Authorize.net API 客户端库的代码。
标签: codeigniter-3 authorize.net