Kevin James
Kevin James

Reputation: 1

Errors when loading ci-merchant library

I'm trying to use http://ci-merchant.org/ for CodeIgniter. But when I load the merchant library, I get these errors:

A PHP Error was encountered

Severity: Warning

Message: stripos() expects parameter 1 to be string, array given

Filename: libraries/merchant.php

Line Number: 97

A PHP Error was encountered

Severity: Warning

Message: strtolower() expects parameter 1 to be string, array given

Filename: libraries/merchant.php

Line Number: 103

Here is my code:

$this->load->library('merchant');
$this->merchant->load('paypal_express');

Upvotes: 0

Views: 242

Answers (1)

Adrian Macneil
Adrian Macneil

Reputation: 13263

Looking at the source of that file, the driver name needs to be passed as a string. So I highly doubt the two lines of code you put above is actually what's being called, it looks like you are passing an array as the driver name.

If you aren't sure where it's coming from, try adding some debug_print_backtrace() lines to the merchant.php file to figure out where the array is getting passed from.

Upvotes: 0

Related Questions