php访问一个不多在对象,php – 该脚本尝试执行一个方法或访问不完整对象的属性...

我收到一个错误,完整的错误是:

Fatal error: authnet_cart_process() [function.authnet-cart-process]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "AuthnetCart" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /home/golfetc/public_html/wp-content/plugins/sccp-2.4.0/authnet_functions.php on line 1266

我正在使用会话来将购物车对象存储在其中,并在某些时候稍后获取。 authnetCart基本上是购物车对象的类。

// Check cart in session

if(isset($_SESSION['AUTHNET_CART'])) {

// Get cart from session

$authnetCart = $_SESSION['AUTHNET_CART'];

foreach($authnetCart->getCartItems() as $item) { // Line#1266

if ($item->getItemId() == $subscription_details->ID ) {

$addNewItem = false;

break;

}

}

......

您可以在第1266行看到,代码不允许我访问其方法。任何帮助将高度赞赏。谢谢

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值