Welcome Guest, Not a member yet? Register   Sign In
Illegal offset type in isset or empty
#1

[eluser]nvanprooyen[/eluser]
I'm working on writing a API call to Magento using CodeIgniter and getting this illegal offset error. Here is an example from Magento's forum for the method I'm trying to use:

Code:
$proxy->call($sessionId, 'product_stock.update', array('Sku', array('qty'=>50, 'is_in_stock'=>1)));

And here is the CI equivalent to that:

Code:
function updateProductInventory($sku) {
        $apiSession = $this->apiConnect();
       // $this->xmlrpc->set_debug(TRUE);
        $this->xmlrpc->method('call');
        $request = array($apiSession, 'product_stock.update', array($sku , array('qty'=>20, 'is_in_stock'=>1)));
        var_dump($request);
        $this->xmlrpc->request($request);
         if (!$this->xmlrpc->send_request()) {
            echo $this->xmlrpc->display_error();
        } else {
            $response =  $data['response'] = $this->xmlrpc->display_response();
            var_dump($response);
        }

Not sure what the problem is, all the other methods I've written functions for so far work fine. The one difference with this one, is there are several arrays in $request. I'm guessing that's what is making it choke, but I'm not positive of that. Anyone have any ideas?


Messages In This Thread
Illegal offset type in isset or empty - by El Forum - 06-15-2011, 11:01 AM
Illegal offset type in isset or empty - by El Forum - 06-15-2011, 11:25 AM
Illegal offset type in isset or empty - by El Forum - 06-15-2011, 11:47 AM
Illegal offset type in isset or empty - by El Forum - 06-15-2011, 12:00 PM
Illegal offset type in isset or empty - by El Forum - 06-15-2011, 12:33 PM
Illegal offset type in isset or empty - by El Forum - 06-15-2011, 12:53 PM
Illegal offset type in isset or empty - by El Forum - 06-15-2011, 01:22 PM
Illegal offset type in isset or empty - by El Forum - 06-16-2011, 08:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB