Derek,
It’s simply where you have the following situation. You have an array being constructed and you have an insert statement. You are building the insert via array or set and sometimes data coming back from PayPal may have IPN data for ALL values on the insert array and sometimes it may not. This used to work pre 1.6.2 no problem, values could be anything.
In the paypal library, the following class var is:
var $ipn_data = array();
Within a controller, you would have something like the following:
class Paypal extends Controller {
function __construct() {
parent::Controller();
$this->load->library('Paypal_Lib');
}
function paypal_ipn() {
// -- Validate the IPN, insert data into DB
// -- Neither this method, nor the set method works if ipn_data['value'] is NOT set to anything.
$insert_arr = array(
"txn_id" => $this->paypal_lib->ipn_data['txn_data'],
"residence_state" => $this->paypal_lib->ipn_data['residence_state']
);
$this->db->insert('db_table');
}
}
I realize this isn’t quite a complete test case but I feel the explanation should suffice as the changes suggested in this thread should solve the problem.
Let’s say $ipn_data array doesn’t have the residence_state value in it because it wasn’t passed from PayPal. So you have an insert array that accounts for that value at ALL times. Instead of forcing manual checks and populating the array, it used to be automatic in prior CI versions.