Jump to content

Cpanel - Change Server


WebhostingNZ.com

Recommended Posts

Hi,

 

I have run across a problem when working with the cPanel module using Blesta 3.6, cPanel mod 2.3.0 and PHP version 5.4, I have error reporting on.

 

Module: cPanel (Ver 2.3.0)
Steps to reproduce:
1) add 2 cpanel servers with the cPanel module
2) add cPanel service to a customer
3) under customer 'manage' the new cPanel service.
4) change 'Server' setting to another server under Service Information.

Error Given:
Undefined index: coupon_code on line 3938 in /home/xxxxxx/public_html/app/controllers/admin_clients.php

Fix:
Use isset.  On line 3938, I'm sure the below could be written better but it works.

if (isset($this->post['coupon_code'])) {
$data['coupon_id'] = $this->getCouponId($this->post['coupon_code']);
}
else {
$data['coupon_id'] = null;
}

I would love to hear back if this above fix may cause problems with the coupon code by setting it to null, the whole else part could be removed it's just habit for me to set to null if it's hit an undefined index error, as it may happen in other parts of the code for the same var.

 

Thanks,
Daniel.

Link to comment
Share on other sites

  • 5 months later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...