WebhostingNZ.com Posted November 2, 2015 Report Posted November 2, 2015 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 module2) add cPanel service to a customer3) 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. Michael 1
Tyson Posted April 28, 2016 Report Posted April 28, 2016 Thanks for the report. Your fix resolves the error, however, setting the coupon ID to null would remove the coupon (if there is one) from the service. Any price override would also be removed. This issue, and the others I just mentioned, is resolved in CORE-2181 for v4.0. Michael 1
Recommended Posts